We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some form of enumerations to the DDL. These are a set of grouped constants that may or may not be used for flags.
The text was updated successfully, but these errors were encountered:
Thinking we could have an enumeration type like so:
ByteOrder : Type = enum { little, big, };
This is sort of like a 'labelled' syntax over 'finite sets', as I tracked down in this twitter thread.
We'd also have a corresponding Format constructor:
Format
ByteOrderFormat : Format = format enum U8 { little = 0x4949, big = 0x4d4d, };
Where repr ByteOrderFormat is equal to ByteOrder
repr ByteOrderFormat
ByteOrder
We could use this for defining unions:
Exif = format struct { byte_order : ByteOrderFormat, body : match byte_order { little => ..., big => ..., }, };
This would nicely solve both #15 and #118 as well.
Sorry, something went wrong.
No branches or pull requests
Add some form of enumerations to the DDL. These are a set of grouped constants that may or may not be used for flags.
The text was updated successfully, but these errors were encountered: