mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:25:07 +00:00
LibJS: Break loop on EOF when parsing object expression
This commit is contained in:
parent
19be842b5b
commit
3e677fd03d
1 changed files with 1 additions and 1 deletions
|
@ -388,7 +388,7 @@ NonnullRefPtr<ObjectExpression> Parser::parse_object_expression()
|
|||
HashMap<FlyString, NonnullRefPtr<Expression>> properties;
|
||||
consume(TokenType::CurlyOpen);
|
||||
|
||||
while (!match(TokenType::CurlyClose)) {
|
||||
while (!done() && !match(TokenType::CurlyClose)) {
|
||||
FlyString property_name;
|
||||
if (match(TokenType::Identifier)) {
|
||||
property_name = consume(TokenType::Identifier).value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue