File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,8 @@ let after_parsing_sig ppf outputprefix ast =
103103
104104let interface ppf fname outputprefix =
105105 Compmisc. init_path false ;
106- Pparse_driver. parse_interface ~tool_name: Js_config. tool_name ppf fname
106+ Pparse_driver. parse_interface ppf fname
107+ |> Cmd_ppx_apply. apply_rewriters ~restore: false ~tool_name: Js_config. tool_name Mli
107108 |> Ppx_entry. rewrite_signature
108109 |> print_if_pipe ppf Clflags. dump_parsetree Printast. interface
109110 |> print_if_pipe ppf Clflags. dump_source Pprintast. signature
@@ -200,8 +201,9 @@ let after_parsing_impl ppf outputprefix (ast : Parsetree.structure) =
200201 process_with_gentype (outputprefix ^ " .cmt" )
201202 end
202203let implementation ppf fname outputprefix =
203- Compmisc. init_path false ;
204- Pparse_driver. parse_implementation ~tool_name: Js_config. tool_name ppf fname
204+ Compmisc. init_path false ;
205+ Pparse_driver. parse_implementation ppf fname
206+ |> Cmd_ppx_apply. apply_rewriters ~restore: false ~tool_name: Js_config. tool_name Ml
205207 |> Ppx_entry. rewrite_implementation
206208 |> print_if_pipe ppf Clflags. dump_parsetree Printast. implementation
207209 |> print_if_pipe ppf Clflags. dump_source Pprintast. structure
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ let file_aux ppf inputfile (type a) (parse_fun : _ -> a)
7373
7474
7575
76- let parse_file kind ppf sourcefile =
76+ let parse_file ( type a ) ( kind : a Ml_binary.kind ) ( ppf : Format.formatter ) ( sourcefile : string ) : a =
7777 Location. set_input_name sourcefile;
7878 let inputfile = preprocess sourcefile in
7979 let ast =
@@ -88,9 +88,9 @@ let parse_file kind ppf sourcefile =
8888
8989
9090
91- let parse_implementation ppf ~ tool_name sourcefile =
92- Cmd_ppx_apply. apply_rewriters ~restore: false ~tool_name Ml (parse_file
91+ let parse_implementation ppf sourcefile =
92+ (parse_file
9393 Ml ppf sourcefile)
94- let parse_interface ppf ~ tool_name sourcefile =
95- Cmd_ppx_apply. apply_rewriters ~restore: false ~tool_name Mli (parse_file
96- Mli ppf sourcefile)
94+
95+ let parse_interface ppf sourcefile =
96+ parse_file Mli ppf sourcefile
Original file line number Diff line number Diff line change 22
33val parse_implementation :
44 Format .formatter ->
5- tool_name :string ->
65 string -> Parsetree .structure
76
87
98val parse_interface :
109 Format .formatter ->
11- tool_name : string ->
10+
1211 string -> Parsetree. signature
You can’t perform that action at this time.
0 commit comments