Skip to content
Snippets Groups Projects
Commit 8b38e0b0 authored by Wilke Pierre's avatar Wilke Pierre
Browse files

Correction de main.ml pour gestion d'erreurs plus sympa.

parent 2d18417c
No related branches found
No related tags found
No related merge requests found
...@@ -292,7 +292,10 @@ let _ = ...@@ -292,7 +292,10 @@ let _ =
add_to_report "e" "E" (Code (file_contents file))); add_to_report "e" "E" (Code (file_contents file)));
run "Elang" !e_run eval_eprog ep; run "Elang" !e_run eval_eprog ep;
cfg_prog_of_eprog ep >>! fun cfg -> match cfg_prog_of_eprog ep with
| Error msg ->
record_compile_result ~error:(Some msg) "CFG";
| OK cfg ->
record_compile_result ~data:([(`Assoc (List.map (fun (fname,Prog.Gfun cfgfun) -> (fname, `Int (Cfg.size_fun cfgfun.cfgfunbody))) cfg))]) "CFG"; record_compile_result ~data:([(`Assoc (List.map (fun (fname,Prog.Gfun cfgfun) -> (fname, `Int (Cfg.size_fun cfgfun.cfgfunbody))) cfg))]) "CFG";
dump !cfg_dump dump_cfg_prog cfg (call_dot "cfg" "CFG"); dump !cfg_dump dump_cfg_prog cfg (call_dot "cfg" "CFG");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment