We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6e4471 commit 51ba929Copy full SHA for 51ba929
compiler/parser/src/lexer.rs
@@ -534,12 +534,15 @@ where
534
}
535
536
fn is_identifier_start(&self, c: char) -> bool {
537
- c == '_' || is_xid_start(c)
+ match c {
538
+ 'a'..='z' | 'A'..='Z' | '_' => true,
539
+ _ => is_xid_start(c),
540
+ }
541
542
543
fn is_identifier_continuation(&self) -> bool {
544
match self.window[0] {
- Some('_' | '0'..='9') => true,
545
+ Some('a'..='z' | 'A'..='Z' | '_' | '0'..='9') => true,
546
Some(c) => is_xid_continue(c),
547
_ => false,
548
0 commit comments