Example #1
0
 @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);
 }
Example #2
0
 @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;
 }