Text.emit: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/text.bend as Text Lines 229-237 of bend-toon-codec@0.1.0.0/src/text.bend: https://jend.leeeet.dev/read.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&start_line=229&end_line=237 import Base # What character `c` emits in state `st`. def emit(+st: Us, +c: U32) -> Ek: match st: case UN{}: ek.pick(U32.is_eq(c, 34), EkEnd{}, ek.pick(U32.is_eq(c, 92), EkNone{}, EkChar{c})) case UB{}: ek.pick(U32.is_eq(c, 117), EkNone{}, simple.emit(esc.code(c))) case UH{k, acc}: hex.emit(hex.val(c), k, acc) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=Ek https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=Us https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=ek.pick https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=esc.code https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=hex.emit https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=hex.val https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=simple.emit