aboutsummaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-09-12 20:00:18 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-09-12 20:00:18 -0400
commit7698efc6e34037c3b6ba2968e77c4e33df4b484e (patch)
treeb4e5e240c15a9942e6aacd0d9757bc7ce5db0729 /scope.c
parentbb9070ca0d79d2314c25b83e4496f43488446734 (diff)
parentd8f19b2f532d0a0d7131c1141ca481fa2d08b946 (diff)
Merge branch 'master' into mem-management
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 00e2417..0355014 100644
--- a/scope.c
+++ b/scope.c
@@ -146,8 +146,20 @@ scope *s;
for (i = 0; i < HASH_SIZE; i++) {
for( tmp=s->table[i]; tmp; tmp = tmp->next) {
- fprintf(stderr, "\t%s:%s\n", tmp->name,
+ if(!tmp->array_info)
+ fprintf(stderr, "\t%s:%s\t", tmp->name,
pretty_type(tmp->var_type));
+ else
+ fprintf(stderr, "\t%s:%s [%d:%d]\t", tmp->name,
+ pretty_type(tmp->var_type),
+ tmp->array_info->start_idx,
+ tmp->array_info->start_idx
+ + tmp->array_info->size);
+ if (tmp->func_info && tmp->func_info->argv) {
+ for (int i = 0; i < tmp->func_info->argc; i++)
+ fprintf(stderr, " %s ", pretty_type(tmp->func_info->argv[i]));
+ }
+ fprintf(stderr, "\n");
}
}
}