Xml.entity.take: def of gralha-xml-doc@0.1.0.1 Import: import gralha-xml-doc@0.1.0.1/xml.bend as Xml Lines 26-34 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=26&end_line=34 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def entity.take(s: String, +name: String, +n: U32) -> Step: match s: case SNil{}: Step{2, 0, name, ""} case SCon{Chr{c}, t}: +ch = c +tail = t U.branch(Step, U32.is_eq(ch, 38), _ => Step{1, 0, name, tail}, _ => U.branch(Step, U32.is_lt(n, 12) && (U.digit(ch) || (U32.is_ge(ch, 65) && U32.is_le(ch, 90)) || (U32.is_ge(ch, 97) && U32.is_le(ch, 122)) || U32.is_eq(ch, 35)), _ => entity.take(tail, SCon{Chr{ch}, name}, (n + 1 : U32)), _ => Step{2, 0, name, SCon{Chr{ch}, tail}})) Uses (13): 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.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=digit https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=Step