|
@@ -1149,32 +1149,32 @@ let check_local_vars_init e =
|
|
|
|
|
|
let pp_counter = ref 1
|
|
|
|
|
|
-let post_process types filters =
|
|
|
+let post_process filters t =
|
|
|
(* ensure that we don't process twice the same (cached) module *)
|
|
|
- List.iter (fun t ->
|
|
|
- let m = (t_infos t).mt_module.m_extra in
|
|
|
- if m.m_processed = 0 then m.m_processed <- !pp_counter;
|
|
|
- if m.m_processed = !pp_counter then
|
|
|
- match t with
|
|
|
- | TClassDecl c ->
|
|
|
- let process_field f =
|
|
|
- match f.cf_expr with
|
|
|
- | None -> ()
|
|
|
- | Some e ->
|
|
|
- f.cf_expr <- Some (List.fold_left (fun e f -> f e) e filters)
|
|
|
- in
|
|
|
- List.iter process_field c.cl_ordered_fields;
|
|
|
- List.iter process_field c.cl_ordered_statics;
|
|
|
- (match c.cl_constructor with
|
|
|
- | None -> ()
|
|
|
- | Some f -> process_field f);
|
|
|
- (match c.cl_init with
|
|
|
+ let m = (t_infos t).mt_module.m_extra in
|
|
|
+ if m.m_processed = 0 then m.m_processed <- !pp_counter;
|
|
|
+ if m.m_processed = !pp_counter then
|
|
|
+ match t with
|
|
|
+ | TClassDecl c ->
|
|
|
+ let process_field f =
|
|
|
+ match f.cf_expr with
|
|
|
| None -> ()
|
|
|
| Some e ->
|
|
|
- c.cl_init <- Some (List.fold_left (fun e f -> f e) e filters));
|
|
|
- | TEnumDecl _ -> ()
|
|
|
- | TTypeDecl _ -> ()
|
|
|
- ) types;
|
|
|
+ f.cf_expr <- Some (List.fold_left (fun e f -> f e) e filters)
|
|
|
+ in
|
|
|
+ List.iter process_field c.cl_ordered_fields;
|
|
|
+ List.iter process_field c.cl_ordered_statics;
|
|
|
+ (match c.cl_constructor with
|
|
|
+ | None -> ()
|
|
|
+ | Some f -> process_field f);
|
|
|
+ (match c.cl_init with
|
|
|
+ | None -> ()
|
|
|
+ | Some e ->
|
|
|
+ c.cl_init <- Some (List.fold_left (fun e f -> f e) e filters));
|
|
|
+ | TEnumDecl _ -> ()
|
|
|
+ | TTypeDecl _ -> ()
|
|
|
+
|
|
|
+let post_process_end() =
|
|
|
incr pp_counter
|
|
|
|
|
|
(* -------------------------------------------------------------------------- *)
|