From 71bdfc566bd50323695842a1c78007e1daac0e61 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Thu, 28 Sep 2023 18:52:29 +0200 Subject: Added a way to discard the content until the end of the location — recover after an error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/lexer.mli | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/lexer.mli') diff --git a/lib/lexer.mli b/lib/lexer.mli index 41c7c11..0a8ec12 100644 --- a/lib/lexer.mli +++ b/lib/lexer.mli @@ -2,9 +2,13 @@ module type Encoding = sig val lexeme : Sedlexing.lexbuf -> string end +exception EOF + val lexer : (module Encoding) -> Sedlexing.lexbuf -> unit -> Tokens.token * Lexing.position * Lexing.position (** Apply the lexer to the source *) + +val discard : Sedlexing.lexbuf -> unit -- cgit v1.2.3