add child_count to scope

This commit is contained in:
yenru0 committed 2025-12-03 01:57:47 +09:00
1 parent 4e2fdf88f9
commit 90b7d8fcbe
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -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;
}
+2
View File
@@ -57,6 +57,8 @@ struct Scope {
struct Scope *child_last;
struct Scope *next_sibling;
int child_count;
int location;
BucketList hashTable[SYMTAB_SIZE];
};