Lex.lex: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex Lines 258-266 of cswap-bend-cli@0.1.0.0/json/lex.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&start_line=258&end_line=266 import Base # Tokens of s. `fuel` is its length. def lex(fuel: Nat, s: String) -> List<&2, Tok>: match fuel s: case _ SNil{}: [] case 0n _: [TErr{"internal: lexer out of fuel"}] case 1n+p SCon{+c, +t}: tok.cons(tok.of(c, t), lex(p, String.drop(t, tok.adv(c, t)))) 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=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=tok.adv https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=tok.cons https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=tok.of