PatternLanguage
PatternLanguage copied to clipboard
The Pattern Language used by the ImHex Hex Editor
Using the version of Pattern Language in ImHex v1.33.2, if `abc` is a struct, then `abc.var` is a little picky on the left-hand side of assignments in the global scope,...
Given the following code: ```hexpat fn hash(str input) { str lowercase = std::string::to_lower(input); u32 length = std::string::length(lowercase); u8 bytes[length]; for(u8 i = 0, i < length, i = i +...
In functions (and the global scope), `u32 var = 123;` is equivalent to `u32 var; var = 123;`. In pattern structs, `u32 var = 123;` creates a local variable (not...
A user-defined type declared inside a namespace can be used inside the namespace without full qualification (aka explicit full scope resolution in name) but functions seem to require the use...
I have a recursive data structure which contains (among other things) a field for the size of the embedded array; reading that array consists of reading elements from the start...
Doc comments (both single line and multiline) now act as comments during preprocessing stage, but are kept for later use by lexer, which now supports single line doc comments now...
[bug_case.zip](https://github.com/WerWolv/PatternLanguage/files/14376295/bug_case.zip) I've attached a zip file containing a test file and pattern for reproduction. Demo screenshots:   The test_data field gets dropped from the parsed data if it is...
The default bits order for a bitfield (without a bitfield_order attribute) is LeastToMostSignificant, but when switching to big endian with `#pragma endian big`, that default seems to change to MostToLeastSignificant....
When I tried the following pattern language on [web](https://pl.werwolv.net/): ``` enum temp : s8 { unknown = -1, fe = 0xfe, one = 1, two = 2, zero = 0,...