aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pc.y1
-rw-r--r--tree.c14
2 files changed, 4 insertions, 11 deletions
diff --git a/pc.y b/pc.y
index 72e9b6a..f97db8d 100644
--- a/pc.y
+++ b/pc.y
@@ -185,7 +185,6 @@ sub_prog_head
tmp->func_info->argc = i;
assert(tmp->func_info->argv = malloc(i * sizeof(int)));
- print_tree($3);
assert(!set_func_types($3, tmp->func_info->argv, i));
tmp->var_type = $5;
diff --git a/tree.c b/tree.c
index 2afdfa6..d1d0e76 100644
--- a/tree.c
+++ b/tree.c
@@ -144,16 +144,10 @@ int spaces;
fprintf(stderr, "[LIST]");
break;
case ID:
- if (t->r && t->r->attr.nval)
- fprintf(stderr, "[ID: %s %s]",
- t->r->attr.nval->name,
- pretty_type(
- t->attr.nval->var_type));
- else
- fprintf(stderr, "[ID: %s %s]",
- t->attr.nval->name,
- pretty_type(
- t->attr.nval->var_type));
+ fprintf(stderr, "[ID: %s %s, ",
+ t->attr.nval->name,
+ pretty_type(
+ t->attr.nval->var_type));
break;
case INUM:
fprintf(stderr, "[INUM: %d]", t->attr.ival);