Dline.lead: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/dline.bend as Dline Lines 27-36 of bend-toon-codec@0.1.0.0/src/dline.bend: https://jend.leeeet.dev/read.txt?path=bend-toon-codec@0.1.0.0/src/dline.bend&start_line=27&end_line=36 import Base # Count the leading spaces and tabs. `live` is true until the first other # character; the recursion runs to the end of the line but only counts # while live. def lead(+s: String, +sp: U32, +tabs: U32, +live: Bool) -> Ld: match s: case SNil{}: Ld{sp, tabs, s} case SCon{Chr{c}, t}: lead.pick(live && (U32.is_eq(c, 32) || U32.is_eq(c, 9)), s, sp, tabs, lead(t, (sp + inc(live && U32.is_eq(c, 32)) : U32), (tabs + inc(live && U32.is_eq(c, 9)) : U32), live && (U32.is_eq(c, 32) || U32.is_eq(c, 9)))) Uses (11): 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.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/dline.bend&name=Ld https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/dline.bend&name=inc https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/dline.bend&name=lead.pick