1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibJS: Delete Declaration::for_each_var_declared_name

1. Replaces for_each_var_declared_name usage with more generic
for_each_var_declared_identifier.
2. Deletes for_each_var_declared_name.
This commit is contained in:
Aliaksandr Kalenik 2023-07-20 17:00:43 +02:00 committed by Andreas Kling
parent 0fa47405df
commit fb94415f03
5 changed files with 13 additions and 22 deletions

View file

@ -769,8 +769,8 @@ void Parser::parse_module(Program& program)
if (found)
continue;
// NOTE: Nothing in the callback throws an exception.
MUST(program.for_each_var_declared_name([&](auto const& name) {
if (name == exported_name)
MUST(program.for_each_var_declared_identifier([&](auto const& identifier) {
if (identifier.string() == exported_name)
found = true;
}));
for (auto& import : program.imports()) {