@@ -10209,25 +10209,19 @@ impl<'a> Parser<'a> {
1020910209 }
1021010210 }
1021110211
10212- /// Parse a `WITH` clause, i.e. a `WITH` keyword followed by a `RECURSIVE` keyword
10213- /// and a comma-separated list of CTE declarations.
10214- fn parse_with_clause(&mut self) -> Result<With, ParserError> {
10215- let with_token = self.get_current_token();
10216- Ok(With {
10217- with_token: with_token.clone().into(),
10218- recursive: self.parse_keyword(Keyword::RECURSIVE),
10219- cte_tables: self.parse_comma_separated(Parser::parse_cte)?,
10220- })
10221- }
10222-
1022310212 /// Parse a query expression, i.e. a `SELECT` statement optionally
1022410213 /// preceded with some `WITH` CTE declarations and optionally followed
1022510214 /// by `ORDER BY`. Unlike some other parse_... methods, this one doesn't
1022610215 /// expect the initial keyword to be already consumed
1022710216 pub fn parse_query(&mut self) -> Result<Box<Query>, ParserError> {
1022810217 let _guard = self.recursion_counter.try_decrease()?;
1022910218 let with = if self.parse_keyword(Keyword::WITH) {
10230- Some(self.parse_with_clause()?)
10219+ let with_token = self.get_current_token();
10220+ Some(With {
10221+ with_token: with_token.clone().into(),
10222+ recursive: self.parse_keyword(Keyword::RECURSIVE),
10223+ cte_tables: self.parse_comma_separated(Parser::parse_cte)?,
10224+ })
1023110225 } else {
1023210226 None
1023310227 };
0 commit comments