diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -145,9 +145,10 @@ ptree *t; if (t->type == LIST){ r = count_args(t->r); l = count_args(t->l); - } else if (t->type == ID) { + } else if (t->type != LIST) { return 1; } else { + fprintf(stderr, "PTR: %x\n", t); yyerror("NOT A PARAMETER LIST\n"); } @@ -177,6 +178,29 @@ int size, *nxt; return size; } +int get_call_types(t, nxt, size) +ptree *t; +int size, *nxt; +{ + int tmp; + + if (!t) + return size; + + if (t->type == LIST){ + tmp = set_func_types(t->l, nxt, size); + for (;size > tmp; --size) ++nxt; + size = set_func_types(t->r, nxt, size); + } else { + if (--size == -1) + yyerror("VARIABLE COUNT CHANGED!!!\n"); + set_ret_type(t); + *nxt = t->ret_type; + return size; + } + return size; +} + int main() { #ifdef DEBUG_TYPES |