def lex.tag
gralha-xml-doc@0.1.0.1 · xml.bend:204
import gralha-xml-doc@0.1.0.1/xml.bend as Xml
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
204def lex.tag(+s: String) -> Lexeme:
205 U.branch(Lexeme, U.prefix(s, "![CDATA["), _ => lex.cdata(U.until.sequence(U.drop(s, "![CDATA["), "]]>", "")),
206 _ => U.branch(Lexeme, U.prefix(s, "!--"), _ => Lexeme{Chars{""}, U.through(s, "-->")},
207 _ => U.branch(Lexeme, U.prefix(s, "?"), _ => Lexeme{Chars{""}, U.through(s, "?>")},
208 _ => U.branch(Lexeme, U.prefix(s, "!"), _ => Lexeme{Chars{""}, U.through(s, ">")},
209 _ => U.branch(Lexeme, U.prefix(s, "/"), _ => lex.shut(U.until(U.drop(s, "/"), 62, "")),
210 _ => lex.named(xml.name(s, "")))))))