Number fields within procedures with a depth-first numbering system

This commit is contained in:
gingerBill
2025-02-19 10:59:05 +00:00
parent 827cd45f04
commit 0bac34eec8
3 changed files with 12 additions and 1 deletions
+4
View File
@@ -358,6 +358,10 @@ gb_internal void check_open_scope(CheckerContext *c, Ast *node) {
scope->flags |= ScopeFlag_Type;
break;
}
if (c->decl && c->decl->proc_lit) {
// Number the scopes within a procedure body depth-first
scope->index = c->decl->scope_index++;
}
c->scope = scope;
c->state_flags |= StateFlag_bounds_check;
}