Skip to main content

Module graph

Module graph 

Source
Expand description

The graph AST: nodes = {...} and branches = {...}.

A node’s in is an expression over other nodes’ outputs, not just a bare name — Record/List are what make fan-in possible. See docs/superpowers/specs/2026-08-03-dag-core-design.md for the full rationale; this module is purely the parsed shape, with no typechecking or execution logic (those live in cuttlefish-host).

Structs§

Branches
branches = { node_name = { "label" -> target; ... }; ... }
GraphParser
A self-contained recursive-descent parser for the nodes = {...} and branches = {...} bodies, operating directly on a token slice.
Node
One node in the graph.
NodeGraph
nodes = { name = { ... }; ... }

Enums§

InputExpr
What feeds a node’s input.

Functions§

is_simple_chain
Whether a graph is a strict linear chain — a single strand where node i’s sole input (if any) is FromNode of node i-1, nothing more: