mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 23:33:15 +00:00
@@ -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