Dline.depth.pick: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/dline.bend as Dline Lines 44-54 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=44&end_line=54 import Base # Depth is spaces divided by the indent size. Strict mode refuses tabs in the # indentation and a count that is not a multiple. Lenient mode floors the # count and reads each leading tab as one indent level. def depth.pick(+bad_tab: Bool, +bad_mult: Bool, +no: U32, +depth: U32, +text: String) -> Result<&2, &2, String, DL>: match bad_tab bad_mult: case True{} _: Fail{at(no, "tabs are not allowed in indentation")} case False{} True{}: Fail{at(no, "indentation is not a multiple of the indent size")} case False{} False{}: Done{DL{no, depth, text, False{}}} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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=bend-toon-codec@0.1.0.0/src/dline.bend&name=DL https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/dline.bend&name=at