final Ide exprAuxIde = forInStatement.getExprAuxIde();
IdeDeclaration exprType = forInStatement.getExpr().getType();
String exprTypeName = exprType != null ? exprType.getQualifiedNameStr() : "";
boolean iterateArrayMode = "Array".equals(exprTypeName) || "Vector$object".equals(exprTypeName);
if (exprAuxIde != null && !iterateArrayMode) {
new SemicolonTerminatedStatement(new VariableDeclaration(SYM_VAR, exprAuxIde, null, null), SYM_SEMICOLON).visit(this);
}
out.writeSymbol(forInStatement.getSymKeyword());
final boolean isForEach = forInStatement.getSymEach() != null;
if (isForEach) {
out.beginComment();
out.writeSymbol(forInStatement.getSymEach());
out.endComment();
}
out.writeSymbol(forInStatement.getLParen());
if (isForEach || iterateArrayMode) {
new VariableDeclaration(SYM_VAR, forInStatement.getAuxIde(), null, null).visit(this);
} else {
if (forInStatement.getDecl() != null) {
forInStatement.getDecl().visit(this);
} else {
forInStatement.getLValue().visit(this);