google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
68 stars 21 forks source link

Support using `requires` with open enums. #65

Open BenjaminLawson opened 1 year ago

BenjaminLawson commented 1 year ago

I would like to be able to use requires to limit the range of values an open enum may have. For example:

enum PageScan:
  ...

struct Example:
  0 [+2] PageScan page_scan
    [requires: 12 < this < 1000]