pub enum Atom {
}Expand description
Pattern atoms.
Variants§
Byte(u8)
Matches a single byte.
Fuzzy(u8)
Applies a bitmask to the next byte comparison.
Save(u8)
Captures the cursor RVA in the save slot.
Skip(u8)
Skips a fixed number of bytes.
SkipRange(u16, u16)
Skips a ranged number of bytes (inclusive).
Push(u8)
Executes a recursive sub-pattern and then resumes at cursor + skip.
Pop
Returns from a recursive sub-pattern.
Jump1
Follows a signed 1-byte relative jump.
Jump4
Follows a signed 4-byte relative jump.
Ptr
Follows an absolute pointer.
Pir(u8)
Follows a position-independent reference from a saved base slot.
ReadI8(u8)
Reads and sign-extends the byte under the cursor, writes to slot, advances by 1.
ReadU8(u8)
Reads and zero-extends the byte under the cursor, writes to slot, advances by 1.
ReadI16(u8)
Reads a little-endian i16, sign-extends, stores in save slot, advances by 2.
ReadU16(u8)
Reads a little-endian u16, zero-extends, stores in save slot, advances by 2.
ReadI32(u8)
Reads a little-endian i32, sign-extends, stores in save slot, advances by 4.
ReadU32(u8)
Reads a little-endian u32, stores it in save slot, and advances the cursor by 4.
Zero(u8)
Writes zero to the given save slot without advancing the cursor.
Back(u8)
Rewinds the cursor by a fixed number of bytes.
Aligned(u8)
Fails if the cursor is not aligned to (1 << value) bytes.
Check(u8)
Fails if the cursor does not equal the value in the given save slot.
Case(u16)
Branches to an alternate pattern arm on failure.
Break(u16)
Jumps past remaining alternate arms when current arm succeeds.
Nop
No-op instruction used to keep pattern control-flow offsets stable.