Add ts_query_cursor_did_exceed_match_limit API

This commit is contained in:
Max Brunsfeld 2021-03-05 15:02:49 -08:00
parent 047d33eecf
commit db6e1d9bdc
5 changed files with 38 additions and 0 deletions

View file

@ -791,6 +791,17 @@ void ts_query_cursor_delete(TSQueryCursor *);
*/
void ts_query_cursor_exec(TSQueryCursor *, const TSQuery *, TSNode);
/**
* Check if this cursor has exceeded its maximum number of in-progress
* matches.
*
* Currently, query cursors have a fixed capacity for storing lists
* of in-progress captures. If this capacity is exceeded, then the
* earliest-starting match will silently be dropped to make room for
* further matches.
*/
bool ts_query_cursor_did_exceed_match_limit(const TSQueryCursor *);
/**
* Set the range of bytes or (row, column) positions in which the query
* will be executed.