ref: 750f64d65eaa7af67dc7377ee948dda823c68476
dir: /types.myr/
use std pkg regex = type status = union `Earlystop `Unbalanced `Emptyparen `Badrep `Noimpl ;; type regex = struct debug : bool pat : byte[:] nmatch : std.size /* VM state */ proglen : std.size prog : reinst[:] nthr : std.size thr : rethread#[:] str : byte[:] strp : std.size matched : std.option(rethread#) ;; type rethread = struct uid : std.size /* just for debugging */ ip : std.size /* the instruction pointer */ mstart : std.size[:] /* match starts */ mend : std.size[:] /* match ends */ ;; type reinst = union /* direct consumers */ `Ibyte byte `Irange [byte, byte] `Idot /* groups */ `Ilbra std.size `Irbra std.size /* anchors */ `Ibol `Ieol /* control flow */ `Ifork [std.size, std.size] `Ijmp std.size `Imatch ;; ;;