binding_web: Add Query.didExceedMatchLimit
This lets wasm clients check whether a query exceeded its maximum number of in-progress matches.
This commit is contained in:
parent
b5ec720696
commit
e8eb3c5d5a
4 changed files with 32 additions and 0 deletions
|
|
@ -670,3 +670,10 @@ void ts_query_captures_wasm(
|
|||
TRANSFER_BUFFER[0] = (const void *)(capture_count);
|
||||
TRANSFER_BUFFER[1] = result.contents;
|
||||
}
|
||||
|
||||
bool ts_query_did_exceed_match_limit_wasm(
|
||||
const TSQuery *self
|
||||
) {
|
||||
if (!scratch_query_cursor) return false;
|
||||
return ts_query_cursor_did_exceed_match_limit(scratch_query_cursor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue