Use get_kind()

This commit is contained in:
greg 2019-01-05 17:28:35 -08:00
parent 8eda74c9a5
commit d0c5dce92b

View File

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