Remove TreeSelectionCallback struct
Just make a typedef for the function type
This commit is contained in:
parent
e6f933a21f
commit
7fbb628c78
4 changed files with 23 additions and 22 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue