Allow creation of nested tracking scopes

It turns out that handling destruction of a nested tracking scope was
not as difficult as I thought and didn't need much changes
This commit is contained in:
aaron 2023-09-25 23:37:51 +01:00
parent 38342b3805
commit c68d0a6c18
7 changed files with 128 additions and 137 deletions

View file

@ -38,7 +38,7 @@ local function switch<T, U>(source: () -> T): (map: Map<T, ((() -> U)?)>) -> ()
throw("map must map a value to a function")
end
local new_scope = create_node(false, "owner")
local new_scope = create_node(false, false)
last_scope = new_scope :: Node<any>
set_owner(new_scope, owner)