mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
21 lines
463 B
Java
21 lines
463 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);
|
|
|
|
double dValue = theEnv.theStack.pop().d;
|
|
String id = theEnv.theStack.pop().id;
|
|
|
|
theEnv.theGlobals.put(id, new Double(dValue));
|
|
|
|
|
|
}
|
|
|
|
} |