diff options
author | Chimrod <> | 2024-12-23 16:39:22 +0100 |
---|---|---|
committer | Chimrod <> | 2024-12-25 21:42:18 +0100 |
commit | 706e2132e443ed422912264f0401ee607d1d2ef5 (patch) | |
tree | e638f578c2e733f7e77b7fb119d2a549c4dbdfb0 /lib/qparser/lex_state.ml | |
parent | cd25e70d1623ac5bd50be1ca2b30db793063c1cc (diff) |
Found a bug in the string interpretation
Diffstat (limited to 'lib/qparser/lex_state.ml')
-rw-r--r-- | lib/qparser/lex_state.ml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/qparser/lex_state.ml b/lib/qparser/lex_state.ml index 4b102b8..2ec1857 100644 --- a/lib/qparser/lex_state.ml +++ b/lib/qparser/lex_state.ml @@ -1,6 +1,4 @@ -(** This module provide functions used to parse the strings. - - *) +(** This module provide functions used to parse the strings. *) exception Out_of_context @@ -111,8 +109,12 @@ and dQuotedStringWraper : Lexbuf.stringWraper = let lexbuf = Lexbuf.buffer buffer in match%sedlex lexbuf with | single_quote -> - Buffer.add_char buf '\''; - wrap ~nested:true f buf buffer + if nested then ( + Buffer.add_char buf '\''; + wrap ~nested:false f buf buffer) + else ( + Buffer.add_char buf '\''; + wrap ~nested:true f buf buffer) | double_quote, double_quote -> Buffer.add_char buf '"'; wrap f buf buffer |