File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4488,6 +4488,16 @@ ThrowCompletionOr<void> ScopeNode::for_each_var_declared_name(ThrowCompletionOrV
4488
4488
return {};
4489
4489
}
4490
4490
4491
+ ThrowCompletionOr<void > ScopeNode::for_each_var_declared_identifier (ThrowCompletionOrVoidCallback<Identifier const &>&& callback) const
4492
+ {
4493
+ for (auto & declaration : m_var_declarations) {
4494
+ TRY (declaration->for_each_bound_identifier ([&](auto const & id) {
4495
+ return callback (id);
4496
+ }));
4497
+ }
4498
+ return {};
4499
+ }
4500
+
4491
4501
ThrowCompletionOr<void > ScopeNode::for_each_var_function_declaration_in_reverse_order (ThrowCompletionOrVoidCallback<FunctionDeclaration const &>&& callback) const
4492
4502
{
4493
4503
for (ssize_t i = m_var_declarations.size () - 1 ; i >= 0 ; i--) {
Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ class ScopeNode : public Statement {
310
310
ThrowCompletionOr<void > for_each_lexically_declared_name (ThrowCompletionOrVoidCallback<DeprecatedFlyString const &>&& callback) const ;
311
311
312
312
ThrowCompletionOr<void > for_each_var_declared_name (ThrowCompletionOrVoidCallback<DeprecatedFlyString const &>&& callback) const ;
313
+ ThrowCompletionOr<void > for_each_var_declared_identifier (ThrowCompletionOrVoidCallback<Identifier const &>&& callback) const ;
313
314
314
315
ThrowCompletionOr<void > for_each_var_function_declaration_in_reverse_order (ThrowCompletionOrVoidCallback<FunctionDeclaration const &>&& callback) const ;
315
316
ThrowCompletionOr<void > for_each_lexical_function_declaration_in_reverse_order (ThrowCompletionOrVoidCallback<FunctionDeclaration const &>&& callback) const ;
You can’t perform that action at this time.
0 commit comments