Fix some memory management bugs with trees
This commit is contained in:
parent
21c0f51b84
commit
ded54a3a1a
5 changed files with 32 additions and 32 deletions
|
|
@ -27,9 +27,9 @@ typedef struct ts_tree {
|
|||
} data;
|
||||
} ts_tree;
|
||||
|
||||
ts_tree * ts_tree_make_leaf(ts_symbol symbol);
|
||||
ts_tree * ts_tree_make_leaf(ts_symbol symbol, size_t size, size_t offset);
|
||||
ts_tree * ts_tree_make_node(ts_symbol symbol, size_t child_count, ts_tree **children);
|
||||
ts_tree * ts_tree_make_error(char lookahead_char, size_t expected_input_count, const ts_symbol *expected_inputs);
|
||||
ts_tree * ts_tree_make_error(char lookahead_char, size_t expected_input_count, const ts_symbol *expected_inputs, size_t size, size_t offset);
|
||||
void ts_tree_retain(ts_tree *tree);
|
||||
void ts_tree_release(ts_tree *tree);
|
||||
int ts_tree_equals(const ts_tree *tree1, const ts_tree *tree2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue