mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibJS: Implement parsing and execution of optional chains
This commit is contained in:
parent
4f7e14e0aa
commit
72ddaa31e3
Notes:
sideshowbarker
2024-07-18 03:58:17 +09:00
Author: https://github.com/alimpfard
Commit: 72ddaa31e3
Pull-request: https://github.com/SerenityOS/serenity/pull/10026
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
6 changed files with 318 additions and 42 deletions
|
@ -76,6 +76,7 @@ public:
|
|||
NonnullRefPtr<WithStatement> parse_with_statement();
|
||||
NonnullRefPtr<DebuggerStatement> parse_debugger_statement();
|
||||
NonnullRefPtr<ConditionalExpression> parse_conditional_expression(NonnullRefPtr<Expression> test);
|
||||
NonnullRefPtr<OptionalChain> parse_optional_chain(NonnullRefPtr<Expression> base);
|
||||
NonnullRefPtr<Expression> parse_expression(int min_precedence, Associativity associate = Associativity::Right, const Vector<TokenType>& forbidden = {});
|
||||
PrimaryExpressionParseResult parse_primary_expression();
|
||||
NonnullRefPtr<Expression> parse_unary_prefixed_expression();
|
||||
|
@ -100,6 +101,8 @@ public:
|
|||
RefPtr<Statement> try_parse_labelled_statement(AllowLabelledFunction allow_function);
|
||||
RefPtr<MetaProperty> try_parse_new_target_expression();
|
||||
|
||||
Vector<CallExpression::Argument> parse_arguments();
|
||||
|
||||
struct Error {
|
||||
String message;
|
||||
Optional<Position> position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue