Esempio n. 1
0
        public object VisitFunctionStatement(FunctionStatement statement)
        {
            // Use interpreter's current environment to allow for functions inside functions (closure)
            MinFunction function = new MinFunction(statement, environment);

            environment.Define(statement.name, function);
            return(null);
        }
Esempio n. 2
0
 public MinFunction(FunctionStatement declaration, Environment closure)
 {
     this.declaration = declaration;
     this.closure     = closure;
 }