mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibJS: Allow the choice of a scope of declaration for a variable (#1408)
Previously, we were assuming all declared variables were bound to a block scope, now, with the addition of declaration types, we can bind a variable to a block scope using `let`, or a function scope (the scope of the inner-most enclosing function of a `var` declaration) using `var`.
This commit is contained in:
parent
542108421e
commit
df40c85f80
6 changed files with 85 additions and 16 deletions
|
@ -37,5 +37,6 @@ class Object;
|
|||
class PrimitiveString;
|
||||
class ScopeNode;
|
||||
class Value;
|
||||
enum class DeclarationType;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue