mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: New expressions look for expressions with correct precedence
This commit is contained in:
parent
688ca7b196
commit
5cd01ed79e
Notes:
sideshowbarker
2024-07-19 05:59:42 +09:00
Author: https://github.com/mattco98
Commit: 5cd01ed79e
Pull-request: https://github.com/SerenityOS/serenity/pull/2436
Reviewed-by: https://github.com/sunverwerth
2 changed files with 52 additions and 2 deletions
|
@ -893,8 +893,7 @@ NonnullRefPtr<NewExpression> Parser::parse_new_expression()
|
|||
{
|
||||
consume(TokenType::New);
|
||||
|
||||
// FIXME: Support full expressions as the callee as well.
|
||||
auto callee = create_ast_node<Identifier>(consume(TokenType::Identifier).value());
|
||||
auto callee = parse_expression(g_operator_precedence.get(TokenType::New).value(), Associativity::Right, { TokenType::ParenOpen });
|
||||
|
||||
Vector<CallExpression::Argument> arguments;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue