Scan.tag.chars: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/scan.bend as Scan Lines 1158-1171 of yaml-for-bend@0.1.1.0/scan.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/scan.bend&start_line=1158&end_line=1171 import Base def tag.chars(s: String, +uri: Bool, +pending: Nat) -> Taken: match s: case SNil{}: Taken{"", 0n} case SCon{+c, +t}: match pending: case 1n+k: taken.skip(tag.chars(t, uri, k)) case 0n: +esc = Bool.and(Char.is_eq(c, '%'), Bool.and(is_hex(peek(t, 0n)), is_hex(peek(t, 1n)))) +ok = Bool.pick(Bool, uri, is_uri(c), is_tag(c)) took.or(Bool.not(Bool.or(esc, ok)), u => taken.cons(Bool.pick(Char, esc, Chr{hex.value(String.take(t, 2n), 0)}, c), 1n, tag.chars(t, uri, Bool.pick(Nat, esc, 2n, 0n)))) Uses (19): 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=Bool.or 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=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.take https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Taken https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=hex.value https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_hex https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_tag https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_uri https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=peek https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=taken.cons https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=taken.skip https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=took.or