implementation for various operators. git-svn-id: svn://10.0.0.236/trunk@32626 18797224-902f-48f8-a5cc-f745e15eee43
20 lines
461 B
Java
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);
|
|
}
|
|
|
|
} |