Added h_parse_result_free().
This commit is contained in:
parent
03a1a3c6f0
commit
fa093d3b06
2 changed files with 9 additions and 0 deletions
|
|
@ -264,6 +264,10 @@ HParseResult* h_parse(const HParser* parser, const uint8_t* input, size_t length
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void h_parse_result_free(HParseResult *result) {
|
||||||
|
h_delete_arena(result->arena);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef INCLUDE_TESTS
|
#ifdef INCLUDE_TESTS
|
||||||
|
|
||||||
#include "test_suite.h"
|
#include "test_suite.h"
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,11 @@ HParser *h_indirect();
|
||||||
*/
|
*/
|
||||||
void h_bind_indirect(HParser* indirect, HParser* inner);
|
void h_bind_indirect(HParser* indirect, HParser* inner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free the memory allocated to an HParseResult when it is no longer needed.
|
||||||
|
*/
|
||||||
|
void h_parse_result_free(HParseResult *result);
|
||||||
|
|
||||||
// Some debugging aids
|
// Some debugging aids
|
||||||
/**
|
/**
|
||||||
* Format token into a compact unambiguous form. Useful for parser test cases.
|
* Format token into a compact unambiguous form. Useful for parser test cases.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue