Example #1
0
 public Context beginEvalContext(Environment environment) {
   Context context = new Context();
   context.type = Type.RETURN;
   context.parent = this;
   context.evaluationDepth = evaluationDepth + 1;
   context.environment = environment;
   context.session = session;
   return context;
 }
Example #2
0
 public Context beginFunction(
     Environment rho, FunctionCall call, Closure closure, PairList arguments) {
   Context context = new Context();
   context.type = Type.FUNCTION;
   context.parent = this;
   context.evaluationDepth = evaluationDepth + 1;
   context.closure = closure;
   context.environment = Environment.createChildEnvironment(closure.getEnclosingEnvironment());
   context.session = session;
   context.arguments = arguments;
   context.call = call;
   context.callingEnvironment = rho;
   return context;
 }