Skip to content

Commit 3af6291

Browse files
committed
Tweak identifer lexing.
By calling `bump()` after getting the first char, to avoid a redundant `ident_continue()` test on it.
1 parent 1a6bda6 commit 3af6291

File tree

1 file changed

+2
-0
lines changed
  • src/libsyntax/parse/lexer

1 file changed

+2
-0
lines changed

src/libsyntax/parse/lexer/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ impl<'a> StringReader<'a> {
516516
return None;
517517
}
518518
let start = self.pos;
519+
self.bump();
519520
while ident_continue(self.ch) {
520521
self.bump();
521522
}
@@ -1155,6 +1156,7 @@ impl<'a> StringReader<'a> {
11551156
}
11561157

11571158
let start = self.pos;
1159+
self.bump();
11581160
while ident_continue(self.ch) {
11591161
self.bump();
11601162
}

0 commit comments

Comments
 (0)