AbstractExpression argExpr = parseExpressionTree(argNode);
assert(argExpr != null);
args.add(argExpr);
}
FunctionExpression expr = new FunctionExpression();
expr.setAttributes(name, volt_alias, idArg);
expr.setArgs(args);
if (value_type != null) {
expr.setValueType(value_type);
expr.setValueSize(value_type.getMaxLengthInBytes());
}
if (parameter != null) {
int parameter_idx = -1; // invalid argument index
try {
parameter_idx = Integer.parseInt(parameter);
} catch (NumberFormatException nfe) {}
assert(parameter_idx >= 0); // better be valid by now.
assert(parameter_idx < args.size()); // must refer to a provided argument
expr.setParameterArg(parameter_idx);
expr.negotiateInitialValueTypes();
}
return expr;
}