Parse.ev.text: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/parse.bend as Parse Lines 735-757 of yaml-for-bend@0.1.1.0/parse.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/parse.bend&start_line=735&end_line=757 import Base # An event as the YAML test suite writes it: "+MAP {} &a ", "=VAL :x". def ev.text(e: Ev) -> String: match e: case StreamStartEv{}: "+STR" case StreamEndEv{}: "-STR" case DocStartEv{explicit}: Bool.pick(String, explicit, "+DOC ---", "+DOC") case DocEndEv{explicit}: Bool.pick(String, explicit, "-DOC ...", "-DOC") case AliasEv{name}: "=ALI *" ++ name case ScalarEv{anchor, tag, text, style}: "=VAL" ++ anchor.text(anchor) ++ tag.text(tag) ++ " " ++ style.mark(style) ++ escaped(text) case SeqStartEv{anchor, tag, flow}: "+SEQ" ++ flow.text(flow, "[]") ++ anchor.text(anchor) ++ tag.text(tag) case SeqEndEv{}: "-SEQ" case MapStartEv{anchor, tag, flow}: "+MAP" ++ flow.text(flow, "{}") ++ anchor.text(anchor) ++ tag.text(tag) case MapEndEv{}: "-MAP" Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick 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=yaml-for-bend@0.1.1.0/parse.bend&name=Ev https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=anchor.text https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=escaped https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=flow.text https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=style.mark https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/parse.bend&name=tag.text