@Override public Value evaluate(EvaluationEnvironment env) { EvaluationEnvironment outerEnv = env.lookupBinding("oev", TSLBlock.OuterEnviromentBinding.class) .map(oeb -> oeb.getStore()) .orElse(EvaluationEnvironment.EMPTY); return exn.evaluate(outerEnv); }
@Override public Value evaluate(EvaluationEnvironment env) { EvaluationEnvironment iEnv = env; Value lastVal = UnitVal.getInstance(this.getLocation()); for (TypedAST exp : this) { if (exp == null) continue; if (exp instanceof EnvironmentExtender) { iEnv = ((EnvironmentExtender) exp).evalDecl(iEnv); } else { lastVal = exp.evaluate(iEnv); } } return lastVal; }