add child_count to scope
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ struct Scope {
|
||||
struct Scope *child_last;
|
||||
struct Scope *next_sibling;
|
||||
|
||||
int child_count;
|
||||
|
||||
int location;
|
||||
BucketList hashTable[SYMTAB_SIZE];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user