1
Fork 0

libsyntax: change Parser::unexpected_last to take &Token

This commit is contained in:
Erick Tryzelaar 2013-02-24 21:20:50 -08:00
parent 28691a0852
commit 34c02a6c0e
2 changed files with 4 additions and 4 deletions

View file

@ -634,7 +634,7 @@ pub impl Parser {
|p| p.parse_ty_field()
);
if elems.len() == 0 {
self.unexpected_last(token::RBRACE);
self.unexpected_last(&token::RBRACE);
}
ty_rec(elems)
} else if *self.token == token::LBRACKET {
@ -868,7 +868,7 @@ pub impl Parser {
lit_float_unsuffixed(self.id_to_str(s)),
token::LIT_STR(s) => lit_str(self.id_to_str(s)),
token::LPAREN => { self.expect(&token::RPAREN); lit_nil },
_ => { self.unexpected_last(*tok); }
_ => { self.unexpected_last(tok); }
}
}