diff --git a/src/symtab.c b/src/symtab.c index 0f645de..505329c 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -73,7 +73,7 @@ void push_scope(Scope scope) { } scope->parent = before; scope->depth = before->depth + 1; - + before->child_count++; scope_stack_top++; scope_stack[scope_stack_top] = scope; } diff --git a/src/symtab.h b/src/symtab.h index 45e5fec..ebfefcb 100644 --- a/src/symtab.h +++ b/src/symtab.h @@ -57,6 +57,8 @@ struct Scope { struct Scope *child_last; struct Scope *next_sibling; + int child_count; + int location; BucketList hashTable[SYMTAB_SIZE]; };