diff options
author | Chimrod <> | 2024-04-08 10:27:14 +0200 |
---|---|---|
committer | Chimrod <> | 2024-04-08 10:27:14 +0200 |
commit | b7cc3a4f423ed6ed98cbf87a408fe80335e4ab9b (patch) | |
tree | 1e933bc673423bc93899be3c70da10b35961b042 /lib/qparser/analyzer.ml | |
parent | acc7d589ee6b0740af79abea0e29ccf504984fd1 (diff) |
Handle syntax error in string escape mecamism
Diffstat (limited to 'lib/qparser/analyzer.ml')
-rw-r--r-- | lib/qparser/analyzer.ml | 8 |
1 files changed, 6 insertions, 2 deletions
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 |