public object visitFunctionStmt(Stmt.Function stmt) { LoxFunction function = new LoxFunction(function: stmt, closure: environment, false); environment.Define(function); return(null); }
object Stmt.IVisitor <object> .visitFunctionStmt(Stmt.Function stmt) { Declare(stmt.name); Define(stmt.name); MarkUnused(stmt.name); ResolveFunction(stmt.parameters, stmt.body, FunctionType.FUNCTION); return(null); }
public LoxFunction(Stmt.Function function, Environment closure, bool isInitializer) { this.function = function; this.closure = closure; this.isInitializer = isInitializer; }