Disallow -inf from being a signed-ident

Just moving the `- disallowed-keyword-identifiers` up to the parent production so it catches all the ident productions, to make any similar mistakes impossible.
This commit is contained in:
Tab Atkins Jr. 2025-06-04 13:45:30 -07:00 committed by GitHub
parent ab92232126
commit 5d82f60407
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -970,10 +970,11 @@ type := '(' node-space* string node-space* ')'
// Strings
string := identifier-string | quoted-string | raw-string ¶
identifier-string := unambiguous-ident | signed-ident | dotted-ident
identifier-string :=
(unambiguous-ident | signed-ident | dotted-ident)
- disallowed-keyword-identifiers
unambiguous-ident :=
((identifier-char - digit - sign - '.') identifier-char*)
- disallowed-keyword-identifiers
(identifier-char - digit - sign - '.') identifier-char*
signed-ident :=
sign ((identifier-char - digit - '.') identifier-char*)?
dotted-ident :=