mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-26 12:12:03 +00:00
LibJS: Remove hand-rolled type information in JS AST in favor of RTTI
This commit is contained in:
parent
07dd73c351
commit
db790dda62
Notes:
sideshowbarker
2024-07-19 00:15:46 +09:00
Author: https://github.com/awesomekling
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