}
- INDENT(indent,outfile);
-
/* print the line */
/* if not block & function */
if (tree->type == EX_OP &&
decls = decls->next;
}
ast_print(tree->right,outfile,indent+4);
+ fprintf(outfile,"}\n");
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 ;
}
+ INDENT(indent,outfile);
/*------------------------------------------------------------------*/
/*----------------------------*/
fprintf(outfile," type (");
printTypeChain(tree->ftype,outfile);
fprintf(outfile,")\n");
+ } else {
+ fprintf(outfile,"\n");
}
return ;
}
/*----------------------------*/
case RETURN:
fprintf(outfile,"RETURN (%p) type (",tree);
- printTypeChain(tree->ftype,outfile);
+ printTypeChain(tree->right->ftype,outfile);
fprintf(outfile,")\n");
- ast_print(tree->left,outfile,indent+4);
+ ast_print(tree->right,outfile,indent+4);
return ;
/*------------------------------------------------------------------*/
/*----------------------------*/
/* ifx Statement */
/*----------------------------*/
case IFX:
+ ast_print(tree->left,outfile,indent);
+ INDENT(indent,outfile);
fprintf(outfile,"IF (%p) \n",tree);
- ast_print(tree->left,outfile,indent+4);
if (tree->trueLabel) {
INDENT(indent,outfile);
fprintf(outfile,"NE(==) 0 goto %s\n",tree->trueLabel->name);
SPEC_NOUN (dest) = SPEC_NOUN (src);
/* if destination has no storage class */
- if (!SPEC_SCLS (dest) || (SPEC_SCLS(dest) == S_CONSTANT && SPEC_SCLS (src)))
+ if (!SPEC_SCLS (dest) ||
+ ((SPEC_SCLS(dest) == S_CONSTANT || SPEC_SCLS(dest) == S_REGISTER) &&
+ SPEC_SCLS (src)))
SPEC_SCLS (dest) = SPEC_SCLS (src);
/* special case for const */
/* copy all the specifications */