Tweak identifer lexing.
By calling `bump()` after getting the first char, to avoid a redundant `ident_continue()` test on it.
This commit is contained in:
@@ -516,6 +516,7 @@ impl<'a> StringReader<'a> {
|
||||
return None;
|
||||
}
|
||||
let start = self.pos;
|
||||
self.bump();
|
||||
while ident_continue(self.ch) {
|
||||
self.bump();
|
||||
}
|
||||
@@ -1155,6 +1156,7 @@ impl<'a> StringReader<'a> {
|
||||
}
|
||||
|
||||
let start = self.pos;
|
||||
self.bump();
|
||||
while ident_continue(self.ch) {
|
||||
self.bump();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user