print("("+ type); for (int y=0; y<dims.length;y++) {print("*");} print(")calloc("); dims[0].accept(this); print(", sizeof("); print(type); if(dims.length>1) print("*"); print("))"); if(dims.length>1) { for(int off=0;off<(dims.length-1);off++) {   int num=((JIntLiteral)dims[off]).intValue(); for(int i=0;i<num;i++) { print(",\n");  lastLeft.accept(this); print("["+i+"]=("); print(type); for (int y=0; y<(dims.length-1-off);y++) {print("*");} print(")calloc("); dims[off+1].accept(this); print(", sizeof("); print(type); if(off<(dims.length-2)) print("*"); print("))"); } } } if (init != null) { init.accept(this); }
super.visitNewArrayExpression(self,type,dims,init);
    public void visitNewArrayExpression(JNewArrayExpression self,                                        CType type,                                        JExpression[] dims,                                        JArrayInitializer init)    {        /*print("(" + type + "*) calloc(");	  dims[0].accept(this);	  print(" , sizeof(");	  print(type);	  print("))");	  if (init != null) {	  init.accept(this);	  }*/		// only print message parameter 	if (PRINT_MSG_PARAM > -1) {	    if (init != null) {		init.accept(this);	    }	    return;	}	print("("+ type);	for (int y=0; y<dims.length;y++) {print("*");}	print(")calloc(");        dims[0].accept(this);        print(", sizeof(");        print(type);	if(dims.length>1)	    print("*");        print("))");	if(dims.length>1) {	    for(int off=0;off<(dims.length-1);off++) {		//Right now only handles JIntLiteral dims		//If cast expression then probably a failure to reduce		int num=((JIntLiteral)dims[off]).intValue();		for(int i=0;i<num;i++) {		    print(",\n");		    //If lastLeft null then didn't come right after an assignment		    lastLeft.accept(this);		    print("["+i+"]=(");		    print(type);		    for (int y=0; y<(dims.length-1-off);y++) {print("*");}		    print(")calloc(");		    dims[off+1].accept(this);		    print(", sizeof(");		    print(type);		    if(off<(dims.length-2))			print("*");		    print("))");		}	    }	}        if (init != null) {            init.accept(this);        }    }