mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibSQL: Handle statements with malformed exists expressions correctly
Previously, statements containing malformed exists expressions such as: `INSERT INTO t(a) VALUES (SELECT 1)`; could cause the parser to crash. The parser will now return an error message instead.
This commit is contained in:
parent
880878e552
commit
896d1e4f42
Notes:
sideshowbarker
2024-07-17 02:59:43 +09:00
Author: https://github.com/tcl3
Commit: 896d1e4f42
Pull-request: https://github.com/SerenityOS/serenity/pull/18340
Issue: https://github.com/SerenityOS/serenity/issues/18036
Issue: https://github.com/SerenityOS/serenity/issues/18302
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 75 additions and 20 deletions
|
@ -77,10 +77,10 @@ private:
|
|||
RefPtr<Expression> parse_column_name_expression(DeprecatedString with_parsed_identifier = {}, bool with_parsed_period = false);
|
||||
RefPtr<Expression> parse_unary_operator_expression();
|
||||
RefPtr<Expression> parse_binary_operator_expression(NonnullRefPtr<Expression> lhs);
|
||||
RefPtr<Expression> parse_chained_expression();
|
||||
RefPtr<Expression> parse_chained_expression(bool surrounded_by_parentheses = true);
|
||||
RefPtr<Expression> parse_cast_expression();
|
||||
RefPtr<Expression> parse_case_expression();
|
||||
RefPtr<Expression> parse_exists_expression(bool invert_expression, TokenType opening_token = TokenType::Exists);
|
||||
RefPtr<Expression> parse_exists_expression(bool invert_expression);
|
||||
RefPtr<Expression> parse_collate_expression(NonnullRefPtr<Expression> expression);
|
||||
RefPtr<Expression> parse_is_expression(NonnullRefPtr<Expression> expression);
|
||||
RefPtr<Expression> parse_match_expression(NonnullRefPtr<Expression> lhs, bool invert_expression);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue