mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibJS: Use an enum class instead of 'bool is_generator'
This avoid confusion in the order of the multiple boolean parameters that exist.
This commit is contained in:
parent
5ffe23e4f3
commit
8b3f8879c1
9 changed files with 46 additions and 29 deletions
|
@ -79,7 +79,7 @@ void Interpreter::enter_scope(const ScopeNode& scope_node, ScopeType scope_type,
|
|||
{
|
||||
ScopeGuard guard([&] {
|
||||
for (auto& declaration : scope_node.functions()) {
|
||||
auto* function = ScriptFunction::create(global_object, declaration.name(), declaration.body(), declaration.parameters(), declaration.function_length(), current_scope(), declaration.is_generator(), declaration.is_strict_mode());
|
||||
auto* function = ScriptFunction::create(global_object, declaration.name(), declaration.body(), declaration.parameters(), declaration.function_length(), current_scope(), declaration.kind(), declaration.is_strict_mode());
|
||||
vm().set_variable(declaration.name(), function, global_object);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue