rust-lang/reference

Further cases where lone underscore isn't covered

Closed this issue · 2 comments

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.

ehuss commented

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.

Ah yes, Token is correct as it stands.