def lead
import yaml-for-bend@0.1.1.0/emit.bend as Emitimport Base
135# What goes before a node's first line: indentation at a line's start, a
136# break and indentation after a key, nothing after "- ".
137def lead(p: Pos, +ind: Nat) -> String:
138 match p:
139 case Line{}:
140 spaces(ind)
141 case Dash{}:
142 ""
143 case Colon{}:
144 "\n" ++ spaces(ind)
145 case More{}:
146 spaces(ind)