Skip to content

Commit

Permalink
grammar: fix disallowed-keyword-identifiers and string-character (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
eilvelia authored Dec 16, 2024
1 parent 0c5604b commit c3bb12c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -863,12 +863,12 @@ unambiguous-ident := ((identifier-char - digit - sign - '.') identifier-char*) -
signed-ident := sign ((identifier-char - digit - '.') identifier-char*)?
dotted-ident := sign? '.' ((identifier-char - digit) identifier-char*)?
identifier-char := unicode - unicode-space - newline - [\\/(){};\[\]"#=] - disallowed-literal-code-points
disallowed-keyword-identifiers := 'true' - 'false' - 'null' - 'inf' - '-inf' - 'nan'
disallowed-keyword-identifiers := 'true' | 'false' | 'null' | 'inf' | '-inf' | 'nan'
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
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]
Expand Down

0 comments on commit c3bb12c

Please sign in to comment.