Format.build: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/layout/format.bend as Format Lines 1803-1826 of bend-lint-rules@0.2.0.0/layout/format.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&start_line=1803&end_line=1826 import Base # The doc of a list of trees, read as mode says. A group's children are # built first, by the same def, as a smaller part of the list. def build(nodes: List<&2, Tree>, +tab: U32, +base: U32, +mode: Mode, st: State) -> Doc: match nodes: case Nil{}: finish(mode, st, tab, base) case Con{Leaf{+t}, +rest}: build(rest, tab, base, mode, visit(mode, Leaf{t}, leaf_doc(t), rest, tab, base, st)) case Con{Group{+open, +close, +children, +block}, +rest}: build( rest, tab, base, mode, visit( mode, Group{open, close, children, block}, build(children, tab, base, mode_of(open, close, children, block), start(base)), rest, tab, base, st ) ) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Doc https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=State https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Tree https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=finish https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=leaf_doc https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=mode_of https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=start https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=visit