*/
Object left = node.jjtGetChild(0).jjtAccept(this, data);
for(int c = 2, size = node.jjtGetNumChildren(); c < size; c += 2) {
Object right = node.jjtGetChild(c).jjtAccept(this, data);
try {
JexlNode op = node.jjtGetChild(c - 1);
if (op instanceof ASTAdditiveOperator) {
String which = ((ASTAdditiveOperator) op).image;
if ("+".equals(which)) {
left = arithmetic.add(left, right);
continue;
}
if ("-".equals(which)) {
left = arithmetic.subtract(left, right);
continue;
}
throw new UnsupportedOperationException("unknown operator " + which);
}
throw new IllegalArgumentException("unknown operator " + op);
} catch (RuntimeException xrt) {
JexlNode xnode = findNullOperand(xrt, node, left, right);
throw new JexlException(xnode, "+/- error", xrt);
}
}
return left;
}