From b7cc3a4f423ed6ed98cbf87a408fe80335e4ab9b Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 8 Apr 2024 10:27:14 +0200 Subject: Handle syntax error in string escape mecamism --- lib/qparser/analyzer.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/qparser/analyzer.ml b/lib/qparser/analyzer.ml index 7d9b7d2..ca2b54f 100644 --- a/lib/qparser/analyzer.ml +++ b/lib/qparser/analyzer.ml @@ -34,11 +34,15 @@ let rec parse : { code = Interpreter.Custom message; start_pos; end_pos } in Error err - | Lexer.UnclosedQuote -> + | Lexer.UnclosedQuote | Lex_state.Out_of_context -> let start_pos, end_pos = Lexbuf.positions l in let err = IncrementalParser. - { code = Interpreter.Custom "Unclosed text"; start_pos; end_pos } + { + code = Interpreter.Custom "Unclosed string"; + start_pos; + end_pos; + } in Error err in -- cgit v1.2.3