mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
LibJS: Implement parsing and execution of optional chains
This commit is contained in:
parent
4f7e14e0aa
commit
72ddaa31e3
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