mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
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.
This commit is contained in:
parent
3c4a9e421f
commit
ee0bf55127
5 changed files with 66 additions and 16 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue