mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:27:42 +00:00
LibJS: Fix broken parsing of 0-argument CallExpression
This commit is contained in:
parent
32963cf74a
commit
9ad17d4674
1 changed files with 5 additions and 7 deletions
|
@ -195,13 +195,11 @@ NonnullOwnPtr<CallExpression> Parser::parse_call_expression(NonnullOwnPtr<Expres
|
||||||
|
|
||||||
NonnullOwnPtrVector<Expression> arguments;
|
NonnullOwnPtrVector<Expression> arguments;
|
||||||
|
|
||||||
for (;;) {
|
while (match_expression()) {
|
||||||
if (match_expression()) {
|
arguments.append(parse_expression());
|
||||||
arguments.append(parse_expression());
|
if (!match(TokenType::Comma))
|
||||||
if (!match(TokenType::Comma))
|
break;
|
||||||
break;
|
consume();
|
||||||
consume();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
consume(TokenType::ParenClose);
|
consume(TokenType::ParenClose);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue