mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibJS: Allow "for" statement without curly braces around body
This commit is contained in:
parent
42f47da75d
commit
9c8363bb5f
Notes:
sideshowbarker
2024-07-19 07:56:04 +09:00
Author: https://github.com/awesomekling
Commit: 9c8363bb5f
2 changed files with 15 additions and 1 deletions
|
@ -810,7 +810,7 @@ NonnullRefPtr<ForStatement> Parser::parse_for_statement()
|
|||
|
||||
consume(TokenType::ParenClose);
|
||||
|
||||
auto body = parse_block_statement();
|
||||
auto body = parse_statement();
|
||||
|
||||
return create_ast_node<ForStatement>(move(init), move(test), move(update), move(body));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue