Scan.tag.suffix: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/scan.bend as Scan Lines 1194-1201 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=1194&end_line=1201 import Base import yaml-for-bend@0.1.1.0/token.bend as T def tag.suffix(t: Taken, +named: Bool, +word: String, +k: Nat, +st: Sc, +at: T.Mark) -> Step: match t: case Taken{+suffix, +n}: +handle = Bool.pick(String, named, "!" ++ word ++ "!", "!") +used = Nat.add(1n, Bool.pick(Nat, named, Nat.add(1n+k, n), n)) when(Step, Bool.and(named, String.is_empty(suffix)), u => fail(st, "did not find expected tag URI while parsing a tag", at), u => when(Step, String.is_empty(suffix), u => tag.emit(st, "", "!", used, at), u => tag.emit(st, handle, suffix, used, at))) Uses (15): 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.pick 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=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Sc https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Step 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=fail https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=tag.emit https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=when https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Mark