Pass reference to parser in stack's tree selection callback

This commit is contained in:
Max Brunsfeld 2015-12-08 12:20:50 -08:00
parent 4abb415113
commit 10286f307f
4 changed files with 21 additions and 8 deletions

View file

@ -24,13 +24,13 @@ typedef struct {
typedef struct {
void *data;
TSTree *(*callback)(void *data, TSTree *, TSTree *);
TSTree *(*callback)(void *, TSTree *, TSTree *);
} TreeSelectionCallback;
/*
* Create a parse stack.
*/
Stack *ts_stack_new(TreeSelectionCallback);
Stack *ts_stack_new();
/*
* Release any resources reserved by a parse stack.
@ -117,6 +117,8 @@ void ts_stack_remove_head(Stack *, int head);
*/
void ts_stack_clear(Stack *);
void ts_stack_set_tree_selection_callback(Stack *, TreeSelectionCallback);
#ifdef __cplusplus
}
#endif