Scan.bs.line: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/scan.bend as Scan Lines 1040-1048 of yaml-for-bend@0.1.1.0/scan.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/scan.bend&start_line=1040&end_line=1048 import Base # A content line starts at the indentation: what waits joins the text. def bs.line(+cur: Cur, +acc: String, +ind: Nat, +max: Nat, +lead: Bool, +lblank: Bool, +brks: Nat, +folded: Bool) -> Bs: +s = cur.s(cur) +c = peek(s, 0n) +fold = Bool.and(Bool.and(folded, lead), Bool.and(Bool.not(lblank), Bool.not(is_blank(c)))) +joined = String.repeat("\n", brks) ++ Bool.pick(String, fold, Bool.pick(String, Nat.is_eq(brks, 0n), " ", ""), Bool.pick(String, lead, "\n", "")) ++ acc Bool.pick(Bs, Bool.or(Bool.not(Nat.is_eq(1n+cur.col(cur), ind)), Bool.or(is_end(c), Bool.and(Nat.is_eq(cur.col(cur), 0n), is_marker(s)))), BsDone{acc, lead, brks, cur}, Bs{cur, joined, ind, max, False{}, is_blank(c), 0n, Content{}}) Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.repeat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=BPhase https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Bs https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Cur https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=cur.col https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=cur.s https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_blank https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_end https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_marker https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=peek