def tree.wrap

emerging-eztoml@0.9.0.0 · main.bend:2092

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

2092# put the child rows back into the parent table. A new implicit table is
2093# consed, not copied on. Inside an inline table it is a table too until the
2094# inline table closes, so the next dotted key can go on in it (inl.seal)
2095def tree.wrap(fr: Fr, child: List<&2, Val>) -> List<&2, Val>:
2096  match fr:
2097    case FrNew{name, parent, path}:
2098      VPair{name, VHead{path, child}} <> parent
2099    case FrRep{name, parent, path}:
2100      rows.repl(parent, name, VHead{path, child})
2101    case FrAot{name, parent, pre, +path}:
2102      rows.repl(parent, name, VAots{path, VAot{path, child} <> pre})

Uses (4)

Used by (1)