LibJS: Handle "for" statements with empty initializer and updater

This commit is contained in:
Andreas Kling 2020-03-25 16:14:18 +01:00
commit 6c9d2cfa5e
Notes: sideshowbarker 2024-07-19 08:08:02 +09:00
3 changed files with 26 additions and 2 deletions

View file

@ -612,7 +612,7 @@ NonnullRefPtr<ForStatement> Parser::parse_for_statement()
RefPtr<Expression> update;
switch (m_current_token.type()) {
case TokenType::Semicolon:
case TokenType::ParenClose:
break;
default:
update = parse_expression(0);