mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
LibJS: Support deleting local variables with operator delete
To make this cleaner i also moved the logic into Reference::delete_.
This commit is contained in:
parent
af58779def
commit
064ed8279e
14 changed files with 82 additions and 10 deletions
|
@ -187,6 +187,7 @@ public:
|
|||
|
||||
Value get_variable(const FlyString& name, GlobalObject&);
|
||||
void set_variable(const FlyString& name, Value, GlobalObject&, bool first_assignment = false, ScopeObject* specific_scope = nullptr);
|
||||
bool delete_variable(FlyString const& name);
|
||||
void assign(const Variant<NonnullRefPtr<Identifier>, NonnullRefPtr<BindingPattern>>& target, Value, GlobalObject&, bool first_assignment = false, ScopeObject* specific_scope = nullptr);
|
||||
void assign(const FlyString& target, Value, GlobalObject&, bool first_assignment = false, ScopeObject* specific_scope = nullptr);
|
||||
void assign(const NonnullRefPtr<BindingPattern>& target, Value, GlobalObject&, bool first_assignment = false, ScopeObject* specific_scope = nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue