summaryrefslogtreecommitdiff
path: root/src/main.ml
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-05 22:20:54 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-05 22:20:54 +0100
commita01d09ca4730de4987d67e73a8ee895f77f57f9c (patch)
treee9f667f874572a51988225a45ab698ce079059a9 /src/main.ml
parent6973d36261d8030c4836a8e25a0e95c19476978e (diff)
downloadLPC-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.ml8
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
| _ ->