def exec

bend-kit-regex@0.8.0.0 · regex.bend:1198

import bend-kit-regex@0.8.0.0/regex.bend as Regex
import Base

1198# slots: capture slots to keep; is_match keeps none, so each ISave is free.
1199def exec(re: Regex, +s: String, +any: Bool) -> Maybe<&2, List<&2, Maybe<&2, U32>>>:
1200  Regex{+prog, +fuel, +slots, +start, bits, asc, plain, must, reverse} = re
1201  +init = List.replicate(Maybe<&2, U32>, Bool.pick(Nat, any, 0n, slots), None{})
1202  run(s, prog, fuel, init, start, any, 0, run.close(Sc{Nil{}, None{}, False{}}, prog, fuel, init, start, 0, None{}, String.get(s, 0n)))

Uses (13)

Used by (2)