Pass reference to parser in stack's tree selection callback
This commit is contained in:
parent
4abb415113
commit
10286f307f
4 changed files with 21 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue