Xml.tree.step: def of gralha-xml-doc@0.1.0.1 Import: import gralha-xml-doc@0.1.0.1/xml.bend as Xml Lines 259-265 of gralha-xml-doc@0.1.0.1/xml.bend: https://jend.leeeet.dev/read.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&start_line=259&end_line=265 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def tree.step(tok: Token, +s: List<&2, Element>) -> List<&2, Element>: match tok: case Chars{txt}: stack.text(s, txt) case Shut{n}: stack.close(s) case Open{n, a, closed}: +node = {Element{n, a, Nil{}, ""} : Element} U.choose(List<&2, Element>, closed, stack.add(s, node), Con{node, s}) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=Element https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=Token https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=stack.add https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=stack.close https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=stack.text