git-hulk commented on code in PR #1574:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1574#discussion_r1864893235
##########
src/parser/mod.rs:
##########
@@ -7979,6 +7979,27 @@ impl<'a> Parser<'a> {
}
}
+ pub fn parse_enum_values(&mut self) -> Result<Vec<EnumValue>, ParserError>
{
+ self.expect_token(&Token::LParen)?;
+ let values = self.parse_comma_separated(Parser::parse_enum_value)?;
+ self.expect_token(&Token::RParen)?;
+ Ok(values)
+ }
+
+ pub fn parse_enum_value(&mut self) -> Result<EnumValue, ParserError> {
+ let str = self.parse_literal_string()?;
+ let value = match self.peek_token().token {
+ Token::Eq => {
+ // Consume the `=` token
+ self.next_token();
+ let value = self.parse_number_value()?;
Review Comment:
Has been Changed to `parse_number`. I initially consider the enum value
won't be a negative value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]