Skip to content

Further cases where lone underscore isn't covered #2020

Description

@mattheww

The Token production in lex.token.syntax is missing an entry for lone _ (which isn't included in IDENTIFIER_OR_KEYWORD).

Similarly the lists in macro.proc.token.macro_rules and macro.proc.token.tree are missing lone underscore, because the Reference doesn't consider "identifier" to include lone uderscore.

Activity

  1. added a commit that references this issue on Sep 29, 2025
  2. ehuss commented on Sep 29, 2025

    @ehuss
    Contributor

    The Token rule includes PUNCTUATION which includes _. Does that cover what you are looking for in lex.token.syntax?

    As for the proc-macro sections, I have opened #2021 to try to clarify that.

  3. mattheww commented on Oct 1, 2025

    @mattheww
    ContributorAuthor

    Ah yes, Token is correct as it stands.

  4. added a commit that references this issue on Oct 12, 2025
  5. added a commit that references this issue on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions