diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-27 12:56:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-28 15:07:08 +0200 |
commit | ee0bf55127dc2add3b271d11c22395f7e29b1860 (patch) | |
tree | f1ed51427d1c26576a6f26ce790cfecfb3a449f2 /Libraries/LibJS/AST.h | |
parent | 3c4a9e421f7465d13da256211414957a9d8650ec (diff) | |
download | serenity-ee0bf55127dc2add3b271d11c22395f7e29b1860.zip |
LibJS: Make AssignmentExpression assign through a Reference
Reference now has assign(Interpreter&, Value) which is used to write
transparently through a Reference into whatever location it refers to.
Diffstat (limited to 'Libraries/LibJS/AST.h')
-rw-r--r-- | Libraries/LibJS/AST.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibJS/AST.h b/Libraries/LibJS/AST.h index e0143f3015..395367afec 100644 --- a/Libraries/LibJS/AST.h +++ b/Libraries/LibJS/AST.h @@ -599,7 +599,7 @@ enum class AssignmentOp { class AssignmentExpression : public Expression { public: - AssignmentExpression(AssignmentOp op, NonnullRefPtr<ASTNode> lhs, NonnullRefPtr<Expression> rhs) + AssignmentExpression(AssignmentOp op, NonnullRefPtr<Expression> lhs, NonnullRefPtr<Expression> rhs) : m_op(op) , m_lhs(move(lhs)) , m_rhs(move(rhs)) @@ -613,7 +613,7 @@ private: virtual const char* class_name() const override { return "AssignmentExpression"; } AssignmentOp m_op; - NonnullRefPtr<ASTNode> m_lhs; + NonnullRefPtr<Expression> m_lhs; NonnullRefPtr<Expression> m_rhs; }; |