@@ -152,10 +152,10 @@ typedef struct {
152152 */
153153typedef struct {
154154 uint32_t id ;
155+ uint32_t capture_list_id ;
155156 uint16_t start_depth ;
156157 uint16_t step_index ;
157158 uint16_t pattern_index ;
158- uint16_t capture_list_id ;
159159 uint16_t consumed_capture_count : 12 ;
160160 bool seeking_immediate_match : 1 ;
161161 bool has_in_progress_alternatives : 1 ;
@@ -183,7 +183,7 @@ typedef struct {
183183 // use. We reuse those existing-but-unused capture lists before trying to
184184 // allocate any new ones. We use an invalid value (UINT32_MAX) for a capture
185185 // list's length to indicate that it's not in use.
186- uint16_t free_capture_list_count ;
186+ uint32_t free_capture_list_count ;
187187} CaptureListPool ;
188188
189189/*
@@ -367,9 +367,7 @@ static CaptureListPool capture_list_pool_new(void) {
367367 return (CaptureListPool ) {
368368 .list = array_new (),
369369 .empty_list = array_new (),
370- // The maximum maxmimum is 64K, since we use `uint16_t` as our capture list
371- // index type.
372- .max_capture_list_count = 65536 ,
370+ .max_capture_list_count = UINT32_MAX ,
373371 .free_capture_list_count = 0 ,
374372 };
375373}
@@ -2318,7 +2316,7 @@ uint32_t ts_query_cursor_match_limit(const TSQueryCursor *self) {
23182316}
23192317
23202318void ts_query_cursor_set_match_limit (TSQueryCursor * self , uint32_t limit ) {
2321- assert (limit > 0 && limit <= 65536 );
2319+ assert (limit > 0 );
23222320 self -> capture_list_pool .max_capture_list_count = limit ;
23232321}
23242322
0 commit comments