Implement Explicit context creation #639

This commit is contained in:
gingerBill
2020-05-14 00:13:26 +01:00
parent af1d4d6e72
commit f661d34049
6 changed files with 39 additions and 11 deletions

View File

@@ -231,6 +231,11 @@ Scope *create_scope(Scope *parent, gbAllocator allocator, isize init_elements_ca
if (parent != nullptr && parent != builtin_pkg->scope) {
DLIST_APPEND(parent->first_child, parent->last_child, s);
}
if (parent != nullptr && parent->flags & ScopeFlag_ContextDefined) {
s->flags |= ScopeFlag_ContextDefined;
}
return s;
}