Esempio n. 1
0
 public Object visitStmtLoop(StmtLoop stmt) {
   Type oldType = type;
   type = TypePrimitive.inttype;
   Expression newIter = doExpression(stmt.getIter());
   type = oldType;
   Statement newBody = (Statement) stmt.getBody().accept(this);
   if (newIter == stmt.getIter() && newBody == stmt.getBody()) return stmt;
   return new StmtLoop(stmt, newIter, newBody);
 }
Esempio n. 2
0
 public Object visitStmtLoop(StmtLoop stmt) {
   Expression ie = stmt.getIter();
   ie.accept(new UpgradeStarToInt(this, TypePrimitive.inttype, nres));
   return super.visitStmtLoop(stmt);
 }