def lead

yaml-for-bend@0.1.1.0 · emit.bend:135

import yaml-for-bend@0.1.1.0/emit.bend as Emit
import 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)

Uses (5)

Used by (1)