Closed
Description
This is how Rust identifiers' lexical syntax is defined: https://doc.rust-lang.org/reference/identifiers.html
This is how the lexer for Rust identifiers is implemented:
rust/compiler/rustc_lexer/src/lib.rs
Lines 264 to 297 in ce0d64e
The specification says it should start with ASCII alphabetic and continue with ASCII alphanumeric or underscore. But the implementation uses http://www.unicode.org/reports/tr31/#Default_Identifier_Syntax which is much more general than that as far as I understand.
I think one of code or lang ref should be updated, but I'm not sure which one.
(I didn't check lexing for other tokens, it might be useful to compare others with the language reference's definitions too)
Metadata
Metadata
Assignees
Labels
No labels