def annotate
import gralha-xml-doc@0.1.0.1/xml.bend as Xmlimport Base
277def annotate(xs: List<&2, Token>, +i: U32) -> List<&2, Token>:
278 match xs:
279 case Nil{}: Nil{}
280 case Con{Open{n, as, closed}, rest}:
281 Con{Open{n, Con{Attr{"#editor-id", U32.show(i)}, as}, closed}, annotate(rest, U32.inc(i))}
282 case Con{tok, rest}: Con{tok, annotate(rest, i)}