Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ayman-sigma committed Dec 2, 2024
1 parent 10bca54 commit 1fd0477
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3682,7 +3682,8 @@ impl<'a> Parser<'a> {
Ok(values)
}

pub fn parse_period_separated<T, F>(&mut self, mut f: F) -> Result<Vec<T>, ParserError>
/// Parse a period-separated list of 1+ items accepted by `F`
fn parse_period_separated<T, F>(&mut self, mut f: F) -> Result<Vec<T>, ParserError>
where
F: FnMut(&mut Parser<'a>) -> Result<T, ParserError>,
{
Expand All @@ -3696,10 +3697,6 @@ impl<'a> Parser<'a> {
Ok(values)
}

pub fn parse_period_separated_identifiers(&mut self) -> Result<Vec<Ident>, 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<T, F>(
&mut self,
Expand Down Expand Up @@ -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)?;
Expand Down

0 comments on commit 1fd0477

Please sign in to comment.