@Override public void setOperand(int index, Object value) { Node node = (value == null || value instanceof Node) ? (Node) value : new ASTScalar(value); jjtAddChild(node, index); // set the parent, as jjtAddChild doesn't do it... if (node != null) { node.jjtSetParent(this); } }
public void setOperand(int index, Object value) { Node node = (value == null || value instanceof Node) ? (Node) value : new ASTScalar(value); jjtAddChild(node, index); // set the parent, as jjtAddChild doesn't do it... if (node != null) { node.jjtSetParent(this); } }
@Override public void jjtAddChild(Node n, int i) { // this is a check that we can't handle properly // in the grammar... do it here... // only allow conditional nodes...no scalars if (!(n instanceof ConditionNode) && !(n instanceof AggregateConditionNode)) { String label = (n instanceof SimpleNode) ? ((SimpleNode) n).expName() : String.valueOf(n); throw new ExpressionException(expName() + ": invalid child - " + label); } super.jjtAddChild(n, i); } }
public void jjtAddChild(Node n, int i) { // this is a check that we can't handle properly // in the grammar... do it here... // only allow conditional nodes...no scalars if (!(n instanceof ConditionNode) && !(n instanceof AggregateConditionNode)) { String label = (n instanceof SimpleNode) ? ((SimpleNode) n).expName() : String.valueOf(n); throw new ExpressionException(expName() + ": invalid child - " + label); } super.jjtAddChild(n, i); } }