Beispiel #1
0
  public static FieldValue evaluate(
      Apply apply, List<FieldValue> values, EvaluationContext context) {
    String name = apply.getFunction();

    Function function = getFunction(name);
    if (function == null) {
      DefineFunction defineFunction = context.resolveFunction(name);
      if (defineFunction == null) {
        throw new UnsupportedFeatureException(apply);
      }

      return evaluate(defineFunction, values, context);
    }

    return function.evaluate(values);
  }
Beispiel #2
0
 protected void eraseAllRefs() {
   if (nrNeededParams >= 0) return;
   if (funcOrVal instanceof Apply) ((Apply) funcOrVal).eraseAllRefs();
   eraseRefs();
 }