Compare commits

...

1 Commits

Author SHA1 Message Date
ade62ba678 Use output_file to print to this file instead to stdout 2022-12-18 16:04:57 +01:00

View File

@@ -133,7 +133,14 @@ let _ =
else ( else (
if !nopopt if !nopopt
then (fun _ -> ()) then (fun _ -> ())
else Format.printf "%a" Ast_to_c.ast_to_c) else
(
let oc = open_out !output_file in
let fmt = Format.make_formatter
(Stdlib.output_substring oc)
(fun () -> Stdlib.flush oc) in
Format.fprintf fmt "%a" Ast_to_c.ast_to_c);
)
end end
end end