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 =
103
103
104
104
let interface ppf fname outputprefix =
105
105
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
107
108
|> Ppx_entry. rewrite_signature
108
109
|> print_if_pipe ppf Clflags. dump_parsetree Printast. interface
109
110
|> print_if_pipe ppf Clflags. dump_source Pprintast. signature
@@ -200,8 +201,9 @@ let after_parsing_impl ppf outputprefix (ast : Parsetree.structure) =
200
201
process_with_gentype (outputprefix ^ " .cmt" )
201
202
end
202
203
let 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
205
207
|> Ppx_entry. rewrite_implementation
206
208
|> print_if_pipe ppf Clflags. dump_parsetree Printast. implementation
207
209
|> 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)
73
73
74
74
75
75
76
- let parse_file kind ppf sourcefile =
76
+ let parse_file ( type a ) ( kind : a Ml_binary.kind ) ( ppf : Format.formatter ) ( sourcefile : string ) : a =
77
77
Location. set_input_name sourcefile;
78
78
let inputfile = preprocess sourcefile in
79
79
let ast =
@@ -88,9 +88,9 @@ let parse_file kind ppf sourcefile =
88
88
89
89
90
90
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
93
93
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 2
2
3
3
val parse_implementation :
4
4
Format .formatter ->
5
- tool_name :string ->
6
5
string -> Parsetree .structure
7
6
8
7
9
8
val parse_interface :
10
9
Format .formatter ->
11
- tool_name : string ->
10
+
12
11
string -> Parsetree. signature
You can’t perform that action at this time.
0 commit comments