fix(compiler): use Plugin.extension instead of the hardcoded ".ml" one

This commit is contained in:
Emile Rolley 2022-08-01 10:28:38 +02:00
parent ce47132342
commit 2da94b88c2

View File

@ -332,7 +332,9 @@ let driver source_file (options : Cli.options) : int =
(Option.value ~default:"stdout" output_file);
Lcalc.To_ocaml.format_program fmt prgm type_ordering
| `Plugin (Plugin.Lcalc p) ->
let output_file, _ = get_output_format ~ext:".ml" () in
let output_file, _ =
get_output_format ~ext:p.Plugin.extension ()
in
Cli.debug_print "Compiling program through backend \"%s\"..."
p.Plugin.name;
p.Plugin.apply ~source_file ~output_file ~scope:options.ex_scope