def name.go

gralha-xml-doc@0.1.0.1 · xml.bend:86

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

86def name.go(stop: Bool, +c: U32, t: String, acc: String) -> U.Scan:
87  match stop:
88    case True{}: U.Scan{U.rev(acc, ""), SCon{Chr{c}, t}}
89    case False{}:
90      match t:
91        case SNil{}: U.Scan{U.rev(SCon{Chr{c}, acc}, ""), ""}
92        case SCon{Chr{c2}, t2}:
93          +cc = c2
94          name.go(name.stop(cc), cc, t2, SCon{Chr{c}, acc})

Uses (7)

Used by (1)