mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
LibJS: Remove hand-rolled type information in JS AST in favor of RTTI
This commit is contained in:
parent
07dd73c351
commit
db790dda62
5 changed files with 44 additions and 67 deletions
|
@ -94,7 +94,7 @@ LexicalEnvironment* ScriptFunction::create_environment()
|
|||
variables.set(parameter.name, { js_undefined(), DeclarationKind::Var });
|
||||
}
|
||||
|
||||
if (body().is_scope_node()) {
|
||||
if (is<ScopeNode>(body())) {
|
||||
for (auto& declaration : static_cast<const ScopeNode&>(body()).variables()) {
|
||||
for (auto& declarator : declaration.declarations()) {
|
||||
variables.set(declarator.id().string(), { js_undefined(), DeclarationKind::Var });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue