summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/AST.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-27 12:37:27 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-28 15:07:08 +0200
commit3c4a9e421f7465d13da256211414957a9d8650ec (patch)
tree1a48800523f79f10f145cb018549adff26cecdd7 /Libraries/LibJS/AST.h
parent67b8e6fc5b4619cb5efe99d4c0cd3dfbc9a8b970 (diff)
downloadserenity-3c4a9e421f7465d13da256211414957a9d8650ec.zip
LibJS: Allow "delete someGlobalVariable"
This is solved by allowing Identifier nodes to produce a Reference with the global object as base.
Diffstat (limited to 'Libraries/LibJS/AST.h')
-rw-r--r--Libraries/LibJS/AST.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibJS/AST.h b/Libraries/LibJS/AST.h
index 27891d2c21..e0143f3015 100644
--- a/Libraries/LibJS/AST.h
+++ b/Libraries/LibJS/AST.h
@@ -516,6 +516,7 @@ public:
virtual Value execute(Interpreter&) const override;
virtual void dump(int indent) const override;
virtual bool is_identifier() const override { return true; }
+ virtual Reference to_reference(Interpreter&) const override;
private:
virtual const char* class_name() const override { return "Identifier"; }