Reference
Relationships
After parsing, Mantou builds a relationship index so expressions can walk the graph cheaply.
Accessors#
node.parent— the explicit parent referencenode.children— direct childrennode.ancestors— parent chain to the rootnode.descendants— everything beneathnode.neighbors— nodes connected by an edgenode.incoming/node.outgoing— edges
Deep styling#
mantou
style node {
background: node.selected ? chili
: node.ancestors.any(selected) ? bamboo
: node.descendants.any(status == "failed") ? danger
: cream
border: node.parent.selected ? scallion : border
}Select Root or Backend below — descendants tint via ancestors.any(selected), and any branch containing a failed node turns danger.
🥟
Org / Dependency Tree
🥟
Nothing selected
Click a node or edge to inspect it. Connected nodes light up, the rest dim.