Scan.scan: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/json/scan.bend as Scan Lines 33-39 of cswap-bend-cli@0.1.0.0/json/scan.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/json/scan.bend&start_line=33&end_line=39 import Base import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex # Tokens before the first comma or closer at depth 0. def scan(toks: List<&2, Lex.Tok>, +d: U32) -> Nat: match toks: case Nil{}: 0n case Con{+h, t}: scan.pick(stopper(tk.kind(h), d), 1n+scan(t, depth.next(tk.kind(h), d))) 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=U32 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/scan.bend&name=depth.next https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/scan.bend&name=scan.pick https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/scan.bend&name=stopper https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/scan.bend&name=tk.kind