def tree.leaf.def.head

emerging-eztoml@0.9.0.0 · main.bend:2128

import emerging-eztoml@0.9.0.0/main.bend as EmergingEztoml
import Base

2128# an explicit header for a table that already exists
2129def tree.leaf.def.head(
2130  seen: Bool,
2131  name: String,
2132  vs: List<&2, Val>,
2133  rows: List<&2, Val>,
2134  stack: List<&2, Fr>,
2135  bad: String,
2136  +path: String,
2137  heads: List<&2, String>
2138) -> End:
2139  match seen:
2140    case True{}:
2141      tree.rebuild(stack, vs, err.first(bad, "duplicate table"), heads)
2142    case False{}:
2143      tree.rebuild(stack, rows.repl(vs, name, VHead{path, rows}), bad,
2144        heads.by.head(path) <> heads)

Uses (10)

Used by (1)