def bits.step

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

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

1231# ponytail: one test per set in the program, not a table lookup; use per-byte tables if sets grow many.
1232def bits.step(xs: List<&2, Bit>, +cur: U32, +c: U32, acc: Bs) -> Bs:
1233  match xs:
1234    case Nil{}:
1235      acc
1236    case Con{Bit{+mask, neg, items, follow, fin, end}, t}:
1237      bits.step(t, cur, c, bits.char(U32.is_ne((cur .&. mask : U32), 0), c, neg, items, follow, fin, end, acc))

Uses (7)

Used by (3)