zeek/auxil/spicy/doc/programming/examples/_parse-bitfield-enum.spicy
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

13 lines
279 B
Plaintext

# Automatically generated; edit in Sphinx source code, not here.
module Test;
import spicy;
type X = enum { A = 1, B = 2 };
public type Foo = unit {
f: bitfield(8) {
x1: 0..3 &convert=X($$);
x2: 4..7 &convert=X($$);
} { print self.f.x1, self.f.x2; }
};