You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
something like a field in a struct with predicates about previous variable.
enum TypeTag : u8{
U32 = 1,
ARRAY = 2
}
struct Variable {
TypeTag tag;
u32 u32Value if tag==TypeTag.U32;
u32 length if tag==TypeTag.ARRAY;
Variable elements[length] if tag==TypeTag.ARRAY; // or pointer to array
}
that may help parsing of byte streams with a bit more complex structures with branching (like some simplified version of MessagePack, Protocol Buffer...) (but they're more complicated, e.g. the type tag is in bitfield, and needs more advanced way to spedcify how to parse a variable int, etc.)
The text was updated successfully, but these errors were encountered:
As of the latest commit, ImHex supports control flow statements using the if and else keywords. I hope this will make the language a lot more useful for you :)
On the picture, only single line statements are shown, however it's possible to enclose more than one statement under one if using curly brackets as you would in any other C-like language
something like a field in a struct with predicates about previous variable.
that may help parsing of byte streams with a bit more complex structures with branching (like some simplified version of MessagePack, Protocol Buffer...) (but they're more complicated, e.g. the type tag is in bitfield, and needs more advanced way to spedcify how to parse a variable int, etc.)
The text was updated successfully, but these errors were encountered: