Uh oh!
There was an error while loading. Please reload this page.
Support parsing parenthesized wildcard (*) - #2123
Conversation
| } | ||
| #[test] | ||
| fn parse_select_distinct_parenthesized_wildcard() { |
There was a problem hiding this comment.
| fnparse_select_distinct_parenthesized_wildcard(){ | |
| fnparse_select_parenthesized_wildcard(){ |
thinking since the syntax isn't implemented solely on the distinct keyword?
| self.next_token(); // consume RParen | ||
| return Ok(Expr::Wildcard(AttachedToken(inner_token))); | ||
| } | ||
| // Not a (*), reset and fall through to parse_expr |
There was a problem hiding this comment.
this looks incorrect per the comment, by reset should we have called prev_token() or similar to undo the consumed inner token *?
| let inner_token = self.next_token(); | ||
| if inner_token.token == Token::Mul && self.peek_token().token == Token::RParen { |
There was a problem hiding this comment.
can this be simplified by calling self.peek_tokens_ref(Token::MUL, Token::RParen)?
romanoff
commented
Dec 5, 2025
@iffyio Updated. Thank you for reviewing |
| // Not a (*), fall through to reset index and call parse_expr | ||
| self.prev_token(); |
There was a problem hiding this comment.
calling self.prev_token() doesn't seem needed? similar to the _ branch, the fall-through paths call self.index = index; to reset at the end it looks like
fa70750 to
3732a4aCompareUh oh!
There was an error while loading. Please reload this page.
Support parsing parenthesized wildcard
(*)Example of query: