File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ let write_embeds ~extension_points ~output ast =
24
24
let iterator = {Ast_iterator. default_iterator with extension} in
25
25
iterator.structure iterator ast;
26
26
match ! content with
27
- | [] -> ()
27
+ | [] -> false
28
28
| content ->
29
29
let text =
30
30
content
@@ -36,4 +36,5 @@ let write_embeds ~extension_points ~output ast =
36
36
in
37
37
let oc = open_out_bin output in
38
38
output_string oc text;
39
- close_out oc
39
+ close_out oc;
40
+ true
Original file line number Diff line number Diff line change @@ -127,13 +127,17 @@ let no_export (rest : Parsetree.structure) : Parsetree.structure =
127
127
]
128
128
| _ -> rest
129
129
130
- let write_embeds outputprefix (ast : Parsetree.structure ) =
131
- if ! Clflags. only_parse = false && ! Js_config. binary_ast then (
132
- match ! Js_config. embeds with
133
- | [] -> ()
134
- | embeds -> Js_embeds. write_embeds ~extension_points: embeds
135
- ~output: (outputprefix ^ Literals. suffix_embeds)
136
- ast);
130
+ let write_embeds outputprefix (ast : Parsetree.structure ) =
131
+ (if ! Clflags. only_parse = false && ! Js_config. binary_ast then
132
+ let wrote_embeds =
133
+ match ! Js_config. embeds with
134
+ | [] -> false
135
+ | embeds ->
136
+ Js_embeds. write_embeds ~extension_points: embeds
137
+ ~output: (outputprefix ^ Literals. suffix_embeds)
138
+ ast
139
+ in
140
+ if wrote_embeds then print_endline " 1" else print_endline " 0" );
137
141
ast
138
142
139
143
let after_parsing_impl ppf outputprefix (ast : Parsetree.structure ) =
You can’t perform that action at this time.
0 commit comments