List<HiddenTokenAwareTree> children = actual.getChildren();
String name = buildFunctionName(children.get(0));
if (children.size() == 1) {
/* No arguments to the function */
return new FunctionExpression(token, name, new EmptyExpression(token));
}
HiddenTokenAwareTree parameterNode = children.get(1);
Expression parameter = (Expression) parentBuilder.switchOn(parameterNode);
//FIXME: (API) this is a hack - if what come out is not comma separated list, add it to comma separated list. - once there is API changing version it will be better to store parameters list in the function
if (!isListOfParameters(parameter)) {
parameter = packIntoListExpression(parameter);
}
return new FunctionExpression(token, name, parameter);
}