gecko-dev/js/js2/java/AssignmentNode.java

16 lines
370 B
Java
Raw Normal View History

1999-05-07 22:18:39 +00:00
class AssignmentNode extends BinaryNode {
AssignmentNode(String aOp, ExpressionNode aLeft, ExpressionNode aRight)
{
super(aOp, aLeft, aRight);
}
1999-05-28 19:00:48 +00:00
JSValue eval(Environment theEnv)
1999-05-07 22:18:39 +00:00
{
1999-05-28 19:00:48 +00:00
JSReference lV = left.evalLHS(theEnv);
JSValue rV = right.eval(theEnv);
1999-05-07 22:18:39 +00:00
1999-05-28 19:00:48 +00:00
return lV.base.putProp(theEnv, lV.id, rV);
1999-05-07 22:18:39 +00:00
}
}