1 parent
a7b02a9e08
commit
fa39d87f88
1 file changed
+6
@@ -201,6 +201,8 @@ gb_internal void lb_open_scope(lbProcedure *p, Scope *s) {
|
||||
}
|
||||
}
|
||||
|
||||
GB_ASSERT(s != nullptr);
|
||||
p->curr_scope = s;
|
||||
p->scope_index += 1;
|
||||
array_add(&p->scope_stack, s);
|
||||
|
||||
@@ -221,6 +223,10 @@ gb_internal void lb_close_scope(lbProcedure *p, lbDeferExitKind kind, lbBlock *b
|
||||
|
||||
}
|
||||
|
||||
if (p->curr_scope) {
|
||||
p->curr_scope = p->curr_scope->parent;
|
||||
}
|
||||
|
||||
p->scope_index -= 1;
|
||||
array_pop(&p->scope_stack);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user