Mostly this enables attempted recursive parsing of submessages. Note
that it is inherently impossible to determine the underlying data type
for LengthDelimited for sure, so this is a best-effort attempt. The user
can disable recursive submessage parsing via Settings.
Other minor changes:
* added #pragma MIME and #pragma endian directives
* enabled UTF-8 display for LengthDelimited types
* added signed LEB128 display for Varint types (although this doesn't
seem to be working on my test case)
* swapped if/else-if structure for match
* fail upon receiving unknown or unsupported WireType
Co-authored-by: Nik <werwolv98@gmail.com>
In issue #346 it is noted that the format functions return the same value repeatidly and erroneously. This is due to the use of global variables which result on only their last value being used in format functions due to their delayed evaluation. Fixed by using local variables instead. Also remove tabs from the file and an unused tags variable.
* repo-wide: trim trailing spaces
Note: This doesn't touch the .tbl files in encodings/ since they include
meaningful trailing spaces (`20= `)
* patterns: clean up duplicate semicolons
* ELF: add header magic check
* glTF: use type::Magic for magic value
* glTF: check that the file size in the header matches
* xgstexture: fix generics syntax for magic value
* JPEG: define hex enum with 0x00 instead of 0X00
* CI: update deprecated actions
---------
Co-authored-by: Nik <werwolv98@gmail.com>
* Add `current_bit_offset()` and `read_bits(...)` to `std::mem`
* Replace deprecated BitfieldOrder enum values with new clearer names
This adds new options named `MostToLeastSignificant` and `LeastToMostSignificant` to replace the old `LeftToRight` and `RightToLeft` names. These names should be much clearer about what they affect and how.
* Throw errors when `std::core::(get|set)_bitfield_order()` are called
* Update all patterns to work with the new bitfield behaviors