Commit 3820e3ec authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

Lexer: avoid using Report on TryWhy3 input (temporary fix for #150)

parent 847b605d
......@@ -285,7 +285,11 @@ rule token = parse
and fail checkpoint =
let t = Lexing.lexeme lb in
let token = match_tokens !last in
let s = (t, token) checkpoint in
let fname = lb.Lexing.lex_curr_p.Lexing.pos_fname in
(* TODO/FIXME: ad-hoc fix for TryWhy3/Str incompatibility *)
let s = if Filename.remove_extension fname = "/trywhy3_input"
else (t, token) checkpoint in
(* Typing.close_file is supposedly done at the end of the file in
parsing.mly. If there is a syntax error, we still need to close it (to
be able to reload). *)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment