Text.text.step: def of ezsys@0.1.0.0 Import: import ezsys@0.1.0.0/src/text.bend as Text Lines 112-130 of ezsys@0.1.0.0/src/text.bend: https://jend.leeeet.dev/read.txt?path=ezsys@0.1.0.0/src/text.bend&start_line=112&end_line=130 import Base # one character: what it writes and the mode after it def text.step( +hd: Char, +tl: String, mode: Mode, +open: String, +close: String, +pairs: text.Pairs() ) -> String & Mode: match mode: case Plain{}: text.plain(String.starts_with(SCon{hd, tl}, open), hd, open) case Opening{left}: ("", text.enter(left)) case InKey{key}: text.shut(String.starts_with(SCon{hd, tl}, close), hd, key, open, close, pairs) case Closing{left}: ("", text.leave(left)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.starts_with https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/text.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/text.bend&name=text.Pairs https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/text.bend&name=text.enter https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/text.bend&name=text.leave https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/text.bend&name=text.plain https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/text.bend&name=text.shut