From efdbf0f9dc0560e749bab93a560ba2a2117a2a20 Mon Sep 17 00:00:00 2001 From: Nickolay Ponomarev Date: Sun, 13 Jan 2019 01:43:28 +0300 Subject: [PATCH] Remove Token::Identifier match arm from parse_value An identifier is not a literal value, and parse_value is not called on such a token anyway. --- src/sqlparser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sqlparser.rs b/src/sqlparser.rs index 0633500f..3ef4c095 100644 --- a/src/sqlparser.rs +++ b/src/sqlparser.rs @@ -734,6 +734,7 @@ impl Parser { Ok(values) } + /// Parse a literal value (numbers, strings, date/time, booleans) fn parse_value(&mut self) -> Result { match self.next_token() { Some(t) => { @@ -753,7 +754,6 @@ impl Parser { Ok(n) => Ok(Value::Long(n)), Err(e) => parser_err!(format!("Could not parse '{}' as i64: {}", n, e)), }, - Token::Identifier(id) => Ok(Value::String(id.to_string())), Token::SingleQuotedString(ref s) => { Ok(Value::SingleQuotedString(s.to_string())) }