Terminate failed query matches before descending whenever possible

When iterating over captures, this prevents reasonable queries from 
forcing the tree cursor to buffer matches unnecessarily.
This commit is contained in:
Max Brunsfeld 2019-09-18 11:37:49 -07:00
parent 374a7ac81e
commit 186b08381c
4 changed files with 203 additions and 96 deletions

View file

@ -16,6 +16,6 @@ typedef struct {
} TreeCursor;
void ts_tree_cursor_init(TreeCursor *, TSNode);
TSFieldId ts_tree_cursor_current_field_id_ext(const TSTreeCursor *, bool *);
TSFieldId ts_tree_cursor_current_status(const TSTreeCursor *, bool *, bool *);
#endif // TREE_SITTER_TREE_CURSOR_H_