Rollup merge of #51240 - nnethercote:parse-2, r=nikomatsakis

Two minor parsing tweaks
This commit is contained in:
Guillaume Gomez 2018-05-31 22:17:16 +02:00 committed by GitHub
commit 7552c2ea64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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();
}
@ -1300,11 +1302,7 @@ impl<'a> StringReader<'a> {
}
'-' => {
self.bump();
match self.ch.unwrap_or('\x00') {
_ => {
Ok(token::LArrow)
}
}
Ok(token::LArrow)
}
_ => {
Ok(token::Lt)