fix a silly stanfu with goto
qc-parse.y:
	suffle the debug code
This commit is contained in:
Bill Currie 2001-06-27 05:45:20 +00:00
parent 18ba72b544
commit 504d03a21a
2 changed files with 10 additions and 9 deletions

View file

@ -922,7 +922,7 @@ emit_expr (expr_t *e)
PR_Statement (op_return, def, 0); PR_Statement (op_return, def, 0);
return; return;
case 'g': case 'g':
emit_branch (op_goto, 0, e); emit_branch (op_goto, 0, e->e.expr.e1);
return; return;
default: default:
fprintf (stderr, fprintf (stderr,

View file

@ -544,19 +544,20 @@ build_function (function_t *f)
void void
emit_function (function_t *f, expr_t *e) emit_function (function_t *f, expr_t *e)
{ {
//PR_PrintType (f->def->type);
//printf (" %s =\n", f->def->name);
pr_scope = f->def; pr_scope = f->def;
while (e) { while (e) {
//print_expr (e);
//puts("");
emit_expr (e); emit_expr (e);
e = e->next; e = e->next;
} }
emit_statement (op_done, 0, 0, 0);
PR_FlushScope (pr_scope); PR_FlushScope (pr_scope);
pr_scope = 0; pr_scope = 0;
/*PR_PrintType (f->def->type);
printf (" %s =\n", f->def->name); //puts ("");
while (e) {
print_expr (e);
puts("");
e = e->next;
}
puts ("");*/
} }