JSValue changes, closing in on JSObject API. Began 'correct' semantic
implementation for various operators. git-svn-id: svn://10.0.0.236/trunk@32626 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -7,10 +7,29 @@ class BinaryNode extends ExpressionNode {
|
||||
op = aOp;
|
||||
}
|
||||
|
||||
void evalLHS(Environment theEnv)
|
||||
{
|
||||
left.evalLHS(theEnv);
|
||||
JSValue lV = theEnv.theStack.pop();
|
||||
right.eval(theEnv);
|
||||
|
||||
if (op == ".")
|
||||
lV.getProp(theEnv);
|
||||
else
|
||||
super.evalLHS(theEnv);
|
||||
}
|
||||
|
||||
void eval(Environment theEnv)
|
||||
{
|
||||
left.eval(theEnv);
|
||||
JSValue lV = theEnv.theStack.pop();
|
||||
right.eval(theEnv);
|
||||
|
||||
if (op == ".")
|
||||
lV.getProp(theEnv);
|
||||
else
|
||||
System.out.println("missing binary op " + op);
|
||||
|
||||
}
|
||||
|
||||
String print(String indent)
|
||||
|
||||
Reference in New Issue
Block a user