def rb.idle

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

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

1455# No thread is live and no match exists. With asc, the seed at the char before j was skipped
1456# because that char cannot start a match: jump to the next byte that may. Without asc, the
1457# seed died on an assertion, so step on as usual; prev matters then.
1458def rb.idle(asc: Maybe<&2, Asc>, a: Array<U32>, +len: U32, +j: U32, +c: U32, +prog: Trie<Inst>, +fuel: Nat, +init: List<&2, Maybe<&2, U32>>, +start: Maybe<&2, List<&2, Inst>>, +any: Bool) -> Rb:
1459  match asc:
1460    case None{}:
1461      rb.step(dec(a, len, j), j, Vm{Nil{}, None{}}, c, prog, fuel, init, start, any)
1462    case Some{+m}:
1463      rb.skip(skip.from(a, len, j, m), len, prog, fuel, init, start)

Uses (15)

Used by (2)