From 7311d0311fef76c3ede84e5d8b87a52e35fd890d Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 1 Jan 2017 21:36:33 -0800 Subject: [PATCH] Simplify pattern a little bit --- src/tokenizer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 28c3733..5b4b17f 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -74,7 +74,7 @@ pub fn tokenize(input: &str) -> TokenizeResult { ',' => Comma, '"' => try!(tokenize_str(&mut iter)), c if !char::is_alphanumeric(c) => try!(tokenize_operator(c, &mut iter)), - c if is_digit(&c) || c == '.' => try!(tokenize_number_or_period(c, &mut iter)), + c @ '.' | c if is_digit(&c) => try!(tokenize_number_or_period(c, &mut iter)), c => try!(tokenize_identifier(c, &mut iter)), }; tokens.push(cur_tok);