def attr.kind
import gralha-xml-doc@0.1.0.1/xml.bend as Xmlimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
127# The parse position after an attribute: the kind of the next character
128# (see attr.kind; 4 at the end of the text) with the attributes so far.
129# What a character starts inside a tag: 0 space, 1 the end of the tag,
130# 2 a self-closing slash, 3 an attribute.
131def attr.kind(+c: U32) -> U32:
132 U.choose(U32, U.space(c), 0, U.choose(U32, U32.is_eq(c, 62), 1, U.choose(U32, U32.is_eq(c, 47), 2, 3)))