1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:12:08 +00:00

LibSQL: Parse IN / NOT IN expressions with a nested SELECT statement

This commit is contained in:
Timothy Flynn 2021-04-23 14:54:37 -04:00 committed by Andreas Kling
parent 004025c3c4
commit fa59d02692
3 changed files with 39 additions and 2 deletions

View file

@ -628,8 +628,8 @@ Optional<NonnullRefPtr<Expression>> Parser::parse_in_expression(NonnullRefPtr<Ex
if (consume_if(TokenType::ParenOpen)) {
if (match(TokenType::Select)) {
// FIXME: Parse "select-stmt".
return {};
auto select_statement = parse_select_statement({});
return create_ast_node<InSelectionExpression>(move(expression), move(select_statement), invert_expression);
}
// FIXME: Consolidate this with parse_chained_expression(). That method consumes the opening paren as