From 916d37b93c8ad0e2fbe98377093726baf051b708 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 5 Feb 2024 09:32:10 +0100 Subject: Ignore the global checkers if there is a syntax error; ignore error during recovery after a syntax error --- lib/qparser/lexer.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/qparser/lexer.ml') diff --git a/lib/qparser/lexer.ml b/lib/qparser/lexer.ml index 5c093b1..e3524cc 100644 --- a/lib/qparser/lexer.ml +++ b/lib/qparser/lexer.ml @@ -277,6 +277,7 @@ let main buffer = parser buffer let rec discard buffer = + let () = Lexbuf.start_recovery buffer in let lexbuf = Lexbuf.buffer buffer in match%sedlex lexbuf with @@ -291,8 +292,5 @@ let rec discard buffer = (for example a missing quote). *) leave_expression buffer; () - | '!' -> - ignore @@ skip_comment buffer; - discard buffer | any -> discard buffer | _ -> raise EOF -- cgit v1.2.3