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);
return;
case 'g':
emit_branch (op_goto, 0, e);
emit_branch (op_goto, 0, e->e.expr.e1);
return;
default:
fprintf (stderr,

View file

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