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/lexbuf.mli | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/qparser/lexbuf.mli') diff --git a/lib/qparser/lexbuf.mli b/lib/qparser/lexbuf.mli index f9812a7..4283db1 100644 --- a/lib/qparser/lexbuf.mli +++ b/lib/qparser/lexbuf.mli @@ -7,7 +7,7 @@ val from_lexbuf : ?reset_line:bool -> Sedlexing.lexbuf -> t (** Create a new buffer *) val start : t -> unit -(** Intialize a new run *) +(** Intialize a new run. *) val buffer : t -> Sedlexing.lexbuf (** Extract the sedlex buffer. Required in each rule. *) @@ -82,3 +82,10 @@ val leave_state : t -> unit (** Leave the current state *) val overlay : t -> lexer -> lexer + +val start_recovery : t -> unit +(** Set the lexer in recovery mode, the lexer raise this mode after an error, + in order to ignore the further errors until a new location *) + +val is_recovery : t -> bool +(** Check if the lexer is in recovery mode *) -- cgit v1.2.3