From 05f74bee05c0c56da593a5e89069711d5993e3b1 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 30 Oct 2023 08:22:39 +0100 Subject: Managed the strings in strings --- lib/qparser/lexbuf.mli | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/qparser/lexbuf.mli') diff --git a/lib/qparser/lexbuf.mli b/lib/qparser/lexbuf.mli index dd13da4..ac3b262 100644 --- a/lib/qparser/lexbuf.mli +++ b/lib/qparser/lexbuf.mli @@ -44,7 +44,7 @@ val rollback : t -> unit *) type lexer = t -> Tokens.token -type buffer_builder = Buffer.t -> lexer +and buffer_builder = ?nested:bool -> Buffer.t -> t -> Tokens.token type stringWraper = { start_string : lexer -> lexer; @@ -60,13 +60,15 @@ type stringWraper = { } type state = - | Token of stringWraper (** Default state, parsing the tokens *) + | Token (** Default state, parsing the tokens *) | String of stringWraper (** String enclosed by [''] *) | MString of int (** String enclosed by [{}]*) | EndString of stringWraper (** State raised just before closing the string *) | Expression (** Expression where [!] is an operator *) +val pp_state : Format.formatter -> state -> unit + val state : t -> state option (** Get the current state for the lexer. @@ -77,3 +79,5 @@ val enter_state : t -> state -> unit val leave_state : t -> unit (** Leave the current state *) + +val overlay : t -> lexer -> lexer -- cgit v1.2.3