Skip to content

Commit 384b309

Browse files
authored
Parse escaped escapes before escaped quotes (#449)
1 parent 6b9220d commit 384b309

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/uTop_lexer.mll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ and symbol idx acc = parse
173173
and cm_string idx= parse
174174
| '"'
175175
{ (String (1, true), idx+1) }
176+
| "\\\\"
176177
| "\\\""
177178
{ let idx2, terminated= string (idx + 2) false lexbuf in
178179
(String (1, terminated), idx2)
@@ -222,6 +223,7 @@ and comment idx depth combining= parse
222223
and string idx combining= parse
223224
| '"'
224225
{ (idx + 1, true) }
226+
| "\\\\"
225227
| "\\\""
226228
{ string (idx + 2) false lexbuf }
227229
| uchar as uchar

0 commit comments

Comments
 (0)