コード例 #1
0
        public object visitFunctionStmt(Stmt.Function stmt)
        {
            LoxFunction function = new LoxFunction(function: stmt, closure: environment, false);

            environment.Define(function);
            return(null);
        }
コード例 #2
0
ファイル: Resolver.cs プロジェクト: equilibrium139/csharplox
 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);
 }
コード例 #3
0
 public LoxFunction(Stmt.Function function, Environment closure, bool isInitializer)
 {
     this.function      = function;
     this.closure       = closure;
     this.isInitializer = isInitializer;
 }