def parse.rep
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
478def parse.rep(ok: Bool, cur: List<&2, Node>, +min: U32, max: Maybe<&2, U32>, +g: Bool, +n: U32, stack: List<&2, Frame>, alts: List<&2, Node>) -> Ps:
479 match ok:
480 case False{}:
481 PsFail{}
482 case True{}:
483 match cur:
484 case Nil{}:
485 PsFail{}
486 case Con{h, t}:
487 Ps{n, True{}, stack, alts, rep(h, min, max, g) <> t}