@@ -352,44 +352,6 @@ static VALUE parser_reset(VALUE self) {
352352 return Qnil ;
353353}
354354
355- /**
356- * Get the duration in microseconds that parsing is allowed to take.
357- *
358- * @return [Integer]
359- *
360- * @note DEPRECATED in tree-sitter 0.26+. This API was removed.
361- * Use TSParseOptions with progress_callback instead.
362- */
363- static VALUE parser_get_timeout_micros (VALUE self ) {
364- // tree-sitter 0.26+ removed timeout_micros API
365- // Return 0 to indicate no timeout (was the default behavior)
366- (void )self ; // suppress unused parameter warning
367- return ULL2NUM (0 );
368- }
369-
370- /**
371- * Set the maximum duration in microseconds that parsing should be allowed to
372- * take before halting.
373- *
374- * If parsing takes longer than this, it will halt early, returning +nil+.
375- *
376- * @see parse
377- *
378- * @note DEPRECATED in tree-sitter 0.26+. This API was removed.
379- * Use TSParseOptions with progress_callback instead.
380- *
381- * @param timeout [Integer]
382- *
383- * @return [nil]
384- */
385- static VALUE parser_set_timeout_micros (VALUE self , VALUE timeout ) {
386- // tree-sitter 0.26+ removed timeout_micros API
387- // This is a no-op for backward compatibility
388- (void )self ; // suppress unused parameter warning
389- (void )timeout ; // suppress unused parameter warning
390- return Qnil ;
391- }
392-
393355void init_parser (void ) {
394356 cParser = rb_define_class_under (mTreeSitter , "Parser" , rb_cObject );
395357
@@ -412,6 +374,4 @@ void init_parser(void) {
412374 parser_parse_string_encoding , 3 );
413375 rb_define_method (cParser , "print_dot_graphs" , parser_print_dot_graphs , 1 );
414376 rb_define_method (cParser , "reset" , parser_reset , 0 );
415- rb_define_method (cParser , "timeout_micros" , parser_get_timeout_micros , 0 );
416- rb_define_method (cParser , "timeout_micros=" , parser_set_timeout_micros , 1 );
417377}
0 commit comments