mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibJS: Use Identifier to represent name of FunctionNode
This commit is contained in:
parent
380abddf3c
commit
a6cdb1655b
4 changed files with 38 additions and 38 deletions
|
@ -845,7 +845,7 @@ ThrowCompletionOr<void> eval_declaration_instantiation(VM& vm, Program const& pr
|
|||
// b. For each FunctionDeclaration f that is directly contained in the StatementList of a Block, CaseClause, or DefaultClause Contained within body, do
|
||||
TRY(program.for_each_function_hoistable_with_annexB_extension([&](FunctionDeclaration& function_declaration) -> ThrowCompletionOr<void> {
|
||||
// i. Let F be StringValue of the BindingIdentifier of f.
|
||||
auto& function_name = function_declaration.name();
|
||||
auto function_name = function_declaration.name();
|
||||
|
||||
// ii. If replacing the FunctionDeclaration f with a VariableStatement that has F as a BindingIdentifier would not produce any Early Errors for body, then
|
||||
// Note: This is checked during parsing and for_each_function_hoistable_with_annexB_extension so it always passes here.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue