Ejemplo n.º 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;
            }
        }
Ejemplo n.º 2
0
 internal LoxEnvironment(LoxEnvironment enclosing)
 {
     this.enclosing = enclosing;
 }
Ejemplo n.º 3
0
 internal LoxEnvironment()
 {
     enclosing = null;
 }