def next
bendvy-ecs-core@0.1.0.3 · relation_cleanup_control.bend:20
import bendvy-ecs-core@0.1.0.3/relation_cleanup_control.bend as RelationCleanupControl
import Base
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
20def next(-S:Data,frame:T.CleanupFrame<S>,descriptors:List<&2,T.Descriptor<S>>,frames:List<&2,T.CleanupFrame<S>>) -> Intent<S>:
21 match frame:
22 case T.CleanupEnter{key}:Check{key,descriptors,frames}
23 case T.CleanupDescriptors{key,[]}:Continue{T.CleanupFinish{key} <> frames}
24 case T.CleanupDescriptors{key,descriptor <> remaining}:Observe{key,descriptor,remaining,frames}
25 case T.CleanupChildren{+key,descriptor,remaining,[]}:Unrelate{key,descriptor,T.CleanupDescriptors{key,remaining} <> frames}
26 case T.CleanupChildren{key,+descriptor,remaining,child <> children}:child_intent(S,kind(S,descriptor),key,descriptor,remaining,child,children,frames)
27 case T.CleanupFinish{key}:Finish{key,frames}