Always escape \ inside single quotes in the grammar text

to match the other uses of it and the metalanguage description below
This commit is contained in:
eilvelia 2024-12-20 16:18:33 +00:00
parent 23918bd55d
commit 3711b6a3c3
No known key found for this signature in database
GPG Key ID: 676244F5C72C5578
1 changed files with 2 additions and 2 deletions

View File

@ -872,8 +872,8 @@ disallowed-keyword-identifiers := 'true' | 'false' | 'null' | 'inf' | '-inf' | '
quoted-string := '"' single-line-string-body '"' | '"""' newline multi-line-string-body newline (unicode-space | ws-escape)* '"""'
single-line-string-body := (string-character - newline)*
multi-line-string-body := (('"' | '""')? string-character)*
string-character := '\' (["\\bfnrts] | 'u{' hex-digit{1, 6} '}') | ws-escape | [^\\"] - disallowed-literal-code-points
ws-escape := '\' (unicode-space | newline)+
string-character := '\\' (["\\bfnrts] | 'u{' hex-digit{1, 6} '}') | ws-escape | [^\\"] - disallowed-literal-code-points
ws-escape := '\\' (unicode-space | newline)+
hex-digit := [0-9a-fA-F]
raw-string := '#' raw-string-quotes '#' | '#' raw-string '#'