Latest changes
git-svn-id: svn://10.0.0.236/trunk@30781 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
21
mozilla/js/js2/java/AssignmentNode.java
Normal file
21
mozilla/js/js2/java/AssignmentNode.java
Normal file
@@ -0,0 +1,21 @@
|
||||
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));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user