From: johanknol Date: Wed, 26 Feb 2003 15:13:03 +0000 (+0000) Subject: made the dumptree a little more readable X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=9f92b57dc7a082d081fe5479a69cd0b3dee5e53b;p=fw%2Fsdcc made the dumptree a little more readable git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2322 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index 4db1c15b..b313dc79 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -4494,9 +4494,7 @@ void ast_print (ast * tree, FILE *outfile, int indent) return; } if (tree->opval.op == NULLOP) { - fprintf(outfile,"\n"); ast_print(tree->left,outfile,indent); - fprintf(outfile,"\n"); ast_print(tree->right,outfile,indent); return ; } @@ -5056,15 +5054,23 @@ void ast_print (ast * tree, FILE *outfile, int indent) fprintf(outfile,"IF (%p) \n",tree); ast_print(tree->left,outfile,indent+2); if (tree->trueLabel) { - INDENT(indent,outfile); + INDENT(indent+2,outfile); fprintf(outfile,"NE(!=) 0 goto %s\n",tree->trueLabel->name); } if (tree->falseLabel) { - INDENT(indent,outfile); + INDENT(indent+2,outfile); fprintf(outfile,"EQ(==) 0 goto %s\n",tree->falseLabel->name); } ast_print(tree->right,outfile,indent+2); return ; + /*----------------------------*/ + /* goto Statement */ + /*----------------------------*/ + case GOTO: + fprintf(outfile,"GOTO (%p) \n",tree); + ast_print(tree->left,outfile,indent+2); + fprintf(outfile,"\n"); + return ; /*------------------------------------------------------------------*/ /*----------------------------*/ /* for Statement */