ref: b00a84d15d8e3dcf8a2558d2d3f615c738864125
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 /* control flow */ `Ifork [std.size, std.size] `Ijmp std.size `Imatch ;; ;;