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.
This commit is contained in:
Nickolay Ponomarev 2019-01-13 01:43:28 +03:00
parent d0a65ffd05
commit efdbf0f9dc

View file

@ -734,6 +734,7 @@ impl Parser {
Ok(values) Ok(values)
} }
/// Parse a literal value (numbers, strings, date/time, booleans)
fn parse_value(&mut self) -> Result<Value, ParserError> { fn parse_value(&mut self) -> Result<Value, ParserError> {
match self.next_token() { match self.next_token() {
Some(t) => { Some(t) => {
@ -753,7 +754,6 @@ impl Parser {
Ok(n) => Ok(Value::Long(n)), Ok(n) => Ok(Value::Long(n)),
Err(e) => parser_err!(format!("Could not parse '{}' as i64: {}", n, e)), 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) => { Token::SingleQuotedString(ref s) => {
Ok(Value::SingleQuotedString(s.to_string())) Ok(Value::SingleQuotedString(s.to_string()))
} }