BendtorchLoad.St.lex: def of bendtorch-load@1.3.0.0 Import: import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad Lines 318-322 of bendtorch-load@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-load@1.3.0.0/main.bend&start_line=318&end_line=322 import Base # the header's tokens, in order; r is what the previous byte left def St.lex(bs: List<&2, U32>, r: LexR, out: List<&2, Tok>) -> List<&2, Tok>: match bs r: case Nil{} LexR{st, ts}: List.reverse(&2, Tok, St.fin(st, St.push(ts, out))) case Con{+b, t} LexR{st, ts}: St.lex(t, St.step(st, b), St.push(ts, out)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=LexR https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=St.fin https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=St.push https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=St.step https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=Tok