Simplify pattern a little bit

This commit is contained in:
greg 2017-01-01 21:36:33 -08:00
parent 1b59c264b4
commit 7311d0311f
1 changed files with 1 additions and 1 deletions

View File

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