def lex.rep
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
278# A trailing "?" makes a repetition lazy.
279def lex.rep(+min: U32, max: Maybe<&2, U32>, t: String, toks: List<&2, Tok>) -> Lx:
280 match t:
281 case SCon{'?', u}:
282 LGo{u, TRep{min, max, False{}} <> toks}
283 case _:
284 LGo{t, TRep{min, max, True{}} <> toks}