function = p.getFunctionLC("@text");
}
@Override
public ValueHolder evaluate(final FormulaContext ctx) throws FormulaReturnException {
ValueHolder params[] = new ValueHolder[children.length];
ValueHolder ret = null;
for (int i = 0; i < children.length; i++) {
params[i] = children[i].evaluate(ctx);
if (params[i].dataType == DataType.ERROR) {
ret = params[i];
break;
}
}
try {
if (ret == null) {
ret = function.evaluate(ctx, params);
}
} catch (RuntimeException e) {
return ValueHolder.valueOf(new EvaluateException(codeLine, codeColumn, e));
}
if (ret.dataType == DataType.ERROR)
ret = ValueHolder.valueOf(ret.getError().getMessage());
return ret;
}