Move raw_identifiers check to the lexer.

This commit is contained in:
Lymia Aluysia 2018-03-18 11:21:38 -05:00
parent 7d5c29b9ea
commit d2e7953d13
No known key found for this signature in database
GPG key ID: DB2E204C989251F7
2 changed files with 5 additions and 4 deletions

View file

@ -784,7 +784,7 @@ impl<'a> Parser<'a> {
fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, ast::Ident> {
match self.token {
token::Ident(i, is_raw) => {
token::Ident(i, _) => {
if self.token.is_reserved_ident() {
let mut err = self.expected_ident_found();
if recover {
@ -793,9 +793,6 @@ impl<'a> Parser<'a> {
return Err(err);
}
}
if is_raw {
self.sess.raw_identifier_spans.borrow_mut().push(self.span);
}
self.bump();
Ok(i)
}