add h_with_endianness()

This commit is contained in:
Sven M. Hallberg 2014-05-07 19:24:26 +02:00
parent 4f188340be
commit 5f920b29f8
4 changed files with 123 additions and 0 deletions

View file

@ -611,6 +611,16 @@ HAMMER_FN_DECL_NOARG(HParser*, h_indirect);
*/
HAMMER_FN_DECL(void, h_bind_indirect, HParser* indirect, const HParser* inner);
/**
* This parser runs its argument parser with the given endianness setting.
*
* The value of 'endianness' should be a bit-wise or of the constants
* BYTE_BIG_ENDIAN/BYTE_LITTLE_ENDIAN and BIT_BIG_ENDIAN/BIT_LITTLE_ENDIAN.
*
* Result token type: p's result type.
*/
HAMMER_FN_DECL(HParser*, h_with_endianness, char endianness, const HParser* p);
/**
* Free the memory allocated to an HParseResult when it is no longer needed.
*/