Copy src/pp.ml to src/ast_to_c and modify src/main.ml accordingly

Just `pp_ast` was renamed to `ast_to_c`.
This commit is contained in:
2022-12-10 18:58:06 +01:00
parent 54d806f149
commit a8e89854a4
2 changed files with 157 additions and 3 deletions

View File

@@ -23,8 +23,9 @@ let check_well_formedness (a: t_nodelist) = Some a
let check_dependencies (a: t_nodelist) = Some a
let simplify_prog (a: t_nodelist) = Some a
let run verbose debug (passes: (t_nodelist -> t_nodelist option) list)
= verbose "RUN_PLACEHOLDER"
let run verbose debug (passes: (t_nodelist -> t_nodelist option) list) ast
= verbose "RUN_PLACEHOLDER";
Format.printf "%a" Ast_to_c.ast_to_c ast
let _ =
(** Usage and argument parsing. *)
@@ -88,6 +89,6 @@ let _ =
(exit_error (Format.sprintf "The pass %s does not exist." pass); exit 0)
| Some f ->
(print_debug ("The pass "^pass^" has been selected."); f)) !passes in
run print_verbose print_debug passes;
run print_verbose print_debug passes ast;
print_verbose "End of the program, exiting gracefully."