diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-12-05 22:20:54 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-12-05 22:20:54 +0100 |
commit | a01d09ca4730de4987d67e73a8ee895f77f57f9c (patch) | |
tree | e9f667f874572a51988225a45ab698ce079059a9 /src/main.ml | |
parent | 6973d36261d8030c4836a8e25a0e95c19476978e (diff) | |
download | LPC-Projet-a01d09ca4730de4987d67e73a8ee895f77f57f9c.tar.gz LPC-Projet-a01d09ca4730de4987d67e73a8ee895f77f57f9c.zip |
Added tests, corrected two failed tests.
Diffstat (limited to 'src/main.ml')
-rw-r--r-- | src/main.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.ml b/src/main.ml index 9fb4e46..35bd6e0 100644 --- a/src/main.ml +++ b/src/main.ml @@ -47,11 +47,13 @@ let () = try let p = Parser.prog Lexer.token buf in - let t = Typing.prog p in close_in f; if !dump then Pretty.print_prog p; - if !dumpt then Pretty_typing.print_prog t; + if not !parse_only then begin + let t = Typing.prog p in + if !dumpt then Pretty_typing.print_prog t; + end with | Lexer.Lexing_error s -> localisation (Lexing.lexeme_start_p buf); @@ -63,7 +65,7 @@ let () = exit 1 | Typing.Error (loc, msg) -> localisation2 loc; - eprintf "%s" msg; + eprintf "%s@." msg; exit 1 | _ -> |