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:
Nicholas Nethercote
2018-05-31 10:52:29 +10:00
parent 1a6bda68cd
commit 3af6291eff

View File

@@ -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();
}