コード例 #1
0
        void executeBlock(List <Stmt> statements, LoxEnvironment environment)
        {
            LoxEnvironment previous = this.environment;

            try
            {
                this.environment = environment;

                foreach (Stmt statement in statements)
                {
                    execute(statement);
                }
            } finally
            {
                this.environment = previous;
            }
        }
コード例 #2
0
 internal LoxEnvironment(LoxEnvironment enclosing)
 {
     this.enclosing = enclosing;
 }
コード例 #3
0
 internal LoxEnvironment()
 {
     enclosing = null;
 }