Parser: fix escaping in #"…"

This commit is contained in:
Emery Hemingway 2022-10-28 13:41:03 -05:00
parent 4ee41a7fce
commit 7e72c2a515
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ grammar "Preserves":
exp <- 'e' * ?('-'|'+') * +Digit
flt <- int * ((frac * exp) | frac | exp)
String <- '"' * *(escaped | (utf8.any - '"')) * '"'
String <- '"' * *(escape * escaped | (utf8.any - '"')) * '"'
ByteString <- charByteString | hexByteString | b64ByteString
charByteString <- '#' * >('"' * >(*binchar) * '"')
@ -67,7 +67,7 @@ grammar "Preserves":
unescaped <- utf8.any - escaped
unicodeEscaped <- 'u' * Xdigit[4]
escaped <- '\\' * ({'{', '"', '|', '\\', 'b', 'f', 'n', 'r', 't'} | unicodeEscaped)
escaped <- {'{', '"', '|', '\\', 'b', 'f', 'n', 'r', 't'} | unicodeEscaped
escape <- '\\'
ws <- *(' ' | '\t' | '\r' | '\n' | ',')