Skip to content

Commit

Permalink
Parse escaped escapes before escaped quotes (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuohy authored Apr 3, 2024
1 parent 6b9220d commit 384b309
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/uTop_lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ and symbol idx acc = parse
and cm_string idx= parse
| '"'
{ (String (1, true), idx+1) }
| "\\\\"
| "\\\""
{ let idx2, terminated= string (idx + 2) false lexbuf in
(String (1, terminated), idx2)
Expand Down Expand Up @@ -222,6 +223,7 @@ and comment idx depth combining= parse
and string idx combining= parse
| '"'
{ (idx + 1, true) }
| "\\\\"
| "\\\""
{ string (idx + 2) false lexbuf }
| uchar as uchar
Expand Down

0 comments on commit 384b309

Please sign in to comment.