From 1fd04774d5de227db153f2d7ffbc388099396b68 Mon Sep 17 00:00:00 2001 From: Ayman Elkfrawy Date: Sun, 24 Nov 2024 12:31:50 -0800 Subject: [PATCH] address comments --- src/parser/mod.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 5db1029ae..c54a6c3bd 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -3682,7 +3682,8 @@ impl<'a> Parser<'a> { Ok(values) } - pub fn parse_period_separated(&mut self, mut f: F) -> Result, ParserError> + /// Parse a period-separated list of 1+ items accepted by `F` + fn parse_period_separated(&mut self, mut f: F) -> Result, ParserError> where F: FnMut(&mut Parser<'a>) -> Result, { @@ -3696,10 +3697,6 @@ impl<'a> Parser<'a> { Ok(values) } - pub fn parse_period_separated_identifiers(&mut self) -> Result, ParserError> { - self.parse_period_separated(|p| p.parse_identifier(false)) - } - /// Parse a keyword-separated list of 1+ items accepted by `F` pub fn parse_keyword_separated( &mut self, @@ -10955,7 +10952,7 @@ impl<'a> Parser<'a> { self.expect_token(&Token::LParen)?; let aggregate_functions = self.parse_comma_separated(Self::parse_aliased_function_call)?; self.expect_keyword(Keyword::FOR)?; - let value_column = self.parse_period_separated_identifiers()?; + let value_column = self.parse_period_separated(|p| p.parse_identifier(false))?; self.expect_keyword(Keyword::IN)?; self.expect_token(&Token::LParen)?;