executeBlock method

void executeBlock(
  1. List<Stmt> statements,
  2. Environment environment
)

Implementation

void executeBlock(List<Stmt.Stmt> statements, Environment environment) {
  Environment previous = this.environment;
  try {
    this.environment = environment;
    for (Stmt.Stmt statement in statements) {
      execute(statement);
    }
  } finally {
    this.environment = previous;
  }
}