@Override
public Var visit(ASTNodeElem node, Object data)
throws VisitorException
{
ValueExpr valueExpr = (ValueExpr)node.getChild().jjtAccept(this, null);
if (valueExpr instanceof Var) {
return (Var)valueExpr;
}
else if (valueExpr instanceof ValueConstant) {
ValueConstant vc = (ValueConstant)valueExpr;
return createConstantVar(vc.getValue());
}
else {
throw new IllegalArgumentException("Unexpected node element result type: " + valueExpr.getClass());
}
}