From a01d09ca4730de4987d67e73a8ee895f77f57f9c Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Thu, 5 Dec 2013 22:20:54 +0100 Subject: Added tests, corrected two failed tests. --- src/main.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main.ml') 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 | _ -> -- cgit v1.2.3