Use get_kind()
This commit is contained in:
parent
8eda74c9a5
commit
d0c5dce92b
@ -61,9 +61,7 @@ impl TokenHandler {
|
||||
fn new(tokens: Vec<Token>) -> TokenHandler {
|
||||
let end_of_file = match tokens.last() {
|
||||
None => (0, 0),
|
||||
Some(s) => {
|
||||
s.offset.clone()
|
||||
}
|
||||
Some(s) => s.offset.clone(),
|
||||
};
|
||||
let tokens = tokens.into_iter().peekable();
|
||||
TokenHandler { tokens, end_of_file }
|
||||
@ -1007,8 +1005,7 @@ impl Parser {
|
||||
use self::ExpressionType::*;
|
||||
|
||||
let tok = self.token_handler.peek_token();
|
||||
let kind = tok.kind.clone();
|
||||
match kind {
|
||||
match tok.get_kind() {
|
||||
DigitGroup(_) | HexLiteral(_) | BinNumberSigil | Period => self.number_literal(),
|
||||
Keyword(Kw::True) => {
|
||||
self.next();
|
||||
|
Loading…
Reference in New Issue
Block a user