From d0c5dce92bc5cc2aea215b25fb783ea839f22718 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 5 Jan 2019 17:28:35 -0800 Subject: [PATCH] Use get_kind() --- schala-lang/language/src/parsing.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/schala-lang/language/src/parsing.rs b/schala-lang/language/src/parsing.rs index c38640b..224c732 100644 --- a/schala-lang/language/src/parsing.rs +++ b/schala-lang/language/src/parsing.rs @@ -61,9 +61,7 @@ impl TokenHandler { fn new(tokens: Vec) -> 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();