Regex.bits.run: def of bend-kit-regex@0.8.0.0 Import: import bend-kit-regex@0.8.0.0/regex.bend as Regex Lines 1255-1268 of bend-kit-regex@0.8.0.0/regex.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-regex@0.8.0.0/regex.bend&start_line=1255&end_line=1268 import Base # r: the sets live at s's head, whether a match was found, and whether one ends at the end of # the text, if the text ends here. Inside the text an assertion can only fail, so fin implies end, # and a match at fin is final. def bits.run(s: String, +sets: List<&2, Bit>, +start: Maybe<&2, List<&2, Inst>>, +atn: U32, +hit1: Bool, r: Bs) -> Bool: match s: case SNil{}: Bs{cur, done, ok} = r done || ok case SCon{Chr{+c}, t}: match r: case Bs{cur, True{}, ok}: True{} case Bs{+cur, False{}, ok}: bits.run(t, sets, start, atn, hit1, bits.go(bits.idle(start, cur, atn, c), sets, atn, hit1, cur, c)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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-kit-regex@0.8.0.0/regex.bend&name=Bit https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Bs https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=Inst https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=bits.go https://jend.leeeet.dev/definition.txt?path=bend-kit-regex@0.8.0.0/regex.bend&name=bits.idle