BendLintRules.Walk.go: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/lib/text/main.bend as BendLintRules Lines 289-311 of bend-lint-rules@0.2.0.0/lib/text/main.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&start_line=289&end_line=311 import Base # The offsets placed, one character of `text` at a time; offsets past its end are placed at its end. def Walk.go(text: String, +at: U32, +line: U32, column: U32, w: Walk) -> List<&2, Located>: match text w: case _ Walk{Nil{}, out}: out case SNil{} Walk{pending, out}: Walk.done(Walk.emit(pending, True{}, 4294967295, line, column, out)) case SCon{+c, t} Walk{+pending, out}: +ends = Char.is_eq(c, '\n') +l = Bool.pick(U32, ends, (line + 1: U32), line) +col = Bool.pick( U32, ends, 1, (column + Bool.pick(U32, U32.is_ge(Char.to_u32(c), 65536), 2, 1): U32) ) Walk.go( t, (at + 1: U32), l, col, Walk.emit(pending, Walk.is_due(pending, (at + 1: U32)), (at + 1: U32), l, col, out) ) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.to_u32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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_ge https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Located https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Walk https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Walk.done https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Walk.emit https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Walk.is_due