Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ayman-sigma committed Nov 24, 2024
1 parent 18ca48f commit e22e3d8
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 @@ -3605,7 +3605,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 @@ -3619,10 +3620,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 @@ -10836,7 +10833,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 e22e3d8

Please sign in to comment.