def sym.close
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
1688# The closure after the char, inside the text: prev and next are any chars, and start is None
1689# so the seed always runs; replay.vm skips a fresh start the way seed.skip does.
1690def sym.close(sc: Sc, +done: Bool, +prog: Trie<Inst>, +fuel: Nat, +slots: Nat, +c: U32) -> Lr:
1691 Sc{items, +best, +stop} = sc
1692 sym.lr(sym.hit(stop, best), done || stop, run.close(Sc{items, best, stop}, prog, fuel, sym.caps(slots, seed.id()), None{}, 0, Some{Chr{c}}, Some{Chr{c}}))