Skip to content

Grammar for "identifier or keyword" seems wrong #1236

Open
@chichid

Description

@chichid

Based on the grammar reference for identifier The following '_' identifier should be invalid, since:

_ is not XID_Start XID_Continue*
and it's not '_' XID_Continue+ either (it's not followed by at least one XID_CONTINUE)

I think the rule should be:

IDENTIFIER_OR_KEYWORD :
      (XID_Start | '_') XID_Continue*

OR---

IDENTIFIER_OR_KEYWORD :
       XID_Start XID_Continue*
     | '_' XID_CONTINUE*

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lexerArea: Lexical specificationA-proc-macroArea: proc-macros

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions