feat(lib): ts_query_cursor_set_max_start_depth - use 0 to reset

This commit is contained in:
Andrew Hlynskyi 2023-04-17 10:54:01 +03:00
parent 1e81a1b67f
commit d4d5e29c91
5 changed files with 132 additions and 43 deletions

View file

@ -4092,7 +4092,11 @@ void ts_query_cursor_set_max_start_depth(
TSQueryCursor *self,
uint32_t max_start_depth
) {
self->max_start_depth = max_start_depth;
if (max_start_depth == 0) {
self->max_start_depth = UINT32_MAX;
} else {
self->max_start_depth = max_start_depth;
}
}
#undef LOG