Skip to main content

Module prune

Module prune 

Source
Expand description

Faithful port of Luau::detail::prune (Analysis/src/TopoSortStatements.cpp:386-401).

// Clip arcs to and from the node
void prune(Node* next)
{
    for (const auto& node : next->provides)
    {
        auto it = node->depends.find(next);
        LUAU_ASSERT(it != node->depends.end());
        node->depends.erase(it);
    }

    for (const auto& node : next->depends)
    {
        auto it = node->provides.find(next);
        LUAU_ASSERT(it != node->provides.end());
        node->provides.erase(it);
    }
}

Functionsยง

prune
Clip arcs to and from the node.