private void updateIndex(int step, Var index, HplsqlParser.For_range_stmtContext ctx) {

    if (ctx.T_REVERSE() == null)
      index.increment(step);
    else
      index.decrement(step);
  }
To update the value of index for FOR Statement
hplsql/src/main/java/org/apache/hive/hplsql/Stmt.java