Files
sousa-gecko/js/js2/java/AssignmentNode.java
T
1999-05-25 21:49:40 +00:00

20 lines
461 B
Java

class AssignmentNode extends BinaryNode {
AssignmentNode(String aOp, ExpressionNode aLeft, ExpressionNode aRight)
{
super(aOp, aLeft, aRight);
}
void eval(Environment theEnv)
{
left.evalLHS(theEnv);
right.eval(theEnv);
JSValue rValue = theEnv.theStack.pop();
JSValue lValue = theEnv.theStack.pop();
theEnv.theStack.push(rValue);
lValue.putProp(theEnv);
}
}