Remove TreeSelectionCallback struct

Just make a typedef for the function type
This commit is contained in:
Max Brunsfeld 2015-12-17 12:08:06 -08:00
parent e6f933a21f
commit 7fbb628c78
4 changed files with 23 additions and 22 deletions

View file

@ -455,9 +455,8 @@ static void ts_parser__start(TSParser *self, TSInput input,
ts_lexer_set_input(&self->lexer, input);
ts_stack_clear(self->stack);
ts_stack_set_tree_selection_callback(self->stack, (TreeSelectionCallback){
self, ts_parser__select_tree,
});
ts_stack_set_tree_selection_callback(self->stack, self,
ts_parser__select_tree);
LookaheadState lookahead_state = {
.reusable_subtree = previous_tree,
@ -504,7 +503,7 @@ static TSTree *ts_parser__finish(TSParser *self, int finished_stack_head) {
* lookahead symbol is consumed.
*/
static bool ts_parser__consume_lookahead(TSParser *self, int head,
TSTree *lookahead) {
TSTree *lookahead) {
for (;;) {
TSStateId state = ts_stack_top_state(self->stack, head);
const TSParseAction *next_action =