aboutsummaryrefslogtreecommitdiff
path: root/lib/qparser/lexer.ml
diff options
context:
space:
mode:
authorChimrod <>2024-02-05 09:32:10 +0100
committerChimrod <>2024-02-08 14:16:41 +0100
commit916d37b93c8ad0e2fbe98377093726baf051b708 (patch)
treee8c6b77368fb8971af11a425ac61e0b3e2014beb /lib/qparser/lexer.ml
parentd7a13b0e5d6e746993e67a291376bd79766e0ed1 (diff)
Ignore the global checkers if there is a syntax error; ignore error during recovery after a syntax error
Diffstat (limited to 'lib/qparser/lexer.ml')
-rw-r--r--lib/qparser/lexer.ml4
1 files changed, 1 insertions, 3 deletions
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