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; } }
internal LoxEnvironment(LoxEnvironment enclosing) { this.enclosing = enclosing; }
internal LoxEnvironment() { enclosing = null; }