Ylex.sq.end: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/fmt/ylex.bend as Ylex Lines 193-200 of cswap-bend-cli@0.1.0.0/fmt/ylex.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/fmt/ylex.bend&start_line=193&end_line=200 import Base # The same for a single-quoted body: `''` is a quote. `prevq`: the last # character was a quote that may close the string. def sq.end(s: String, +n: Nat, +prevq: Bool) -> Maybe<&2, Nat>: match s: case SNil{}: sq.eos(prevq, n) case SCon{Chr{+c}, t}: sq.pick(prevq && Bool.not(U32.is_eq(c, 39)), n, sq.end(t, Nat.add(n, 1n), Bool.not(prevq) && U32.is_eq(c, 39))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/ylex.bend&name=sq.eos https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/ylex.bend&name=sq.pick