feat(lib)!: remove deprecated functions

This commit is contained in:
Amaan Qureshi 2025-09-11 03:10:10 -04:00 committed by Amaan Qureshi
parent 917895e6a3
commit 821cf797f2
5 changed files with 8 additions and 288 deletions

View file

@ -299,16 +299,7 @@ const TSRange *ts_parser_included_ranges(
* are four possible reasons for failure:
* 1. The parser does not have a language assigned. Check for this using the
[`ts_parser_language`] function.
* 2. Parsing was cancelled due to a timeout that was set by an earlier call to
* the [`ts_parser_set_timeout_micros`] function. You can resume parsing from
* where the parser left out by calling [`ts_parser_parse`] again with the
* same arguments. Or you can start parsing from scratch by first calling
* [`ts_parser_reset`].
* 3. Parsing was cancelled using a cancellation flag that was set by an
* earlier call to [`ts_parser_set_cancellation_flag`]. You can resume parsing
* from where the parser left out by calling [`ts_parser_parse`] again with
* the same arguments.
* 4. Parsing was cancelled due to the progress callback returning true. This callback
* 2. Parsing was cancelled due to the progress callback returning true. This callback
* is passed in [`ts_parser_parse_with_options`] inside the [`TSParseOptions`] struct.
*
* [`read`]: TSInput::read
@ -366,7 +357,7 @@ TSTree *ts_parser_parse_string_encoding(
/**
* Instruct the parser to start the next parse from the beginning.
*
* If the parser previously failed because of a timeout or a cancellation, then
* If the parser previously failed because of the progress callback, then
* by default, it will resume where it left off on the next call to
* [`ts_parser_parse`] or other parsing functions. If you don't want to resume,
* and instead intend to use this parser to parse some other document, you must
@ -374,42 +365,6 @@ TSTree *ts_parser_parse_string_encoding(
*/
void ts_parser_reset(TSParser *self);
/**
* @deprecated use [`ts_parser_parse_with_options`] and pass in a callback instead, this will be removed in 0.26.
*
* Set the maximum duration in microseconds that parsing should be allowed to
* take before halting.
*
* If parsing takes longer than this, it will halt early, returning NULL.
* See [`ts_parser_parse`] for more information.
*/
void ts_parser_set_timeout_micros(TSParser *self, uint64_t timeout_micros);
/**
* @deprecated use [`ts_parser_parse_with_options`] and pass in a callback instead, this will be removed in 0.26.
*
* Get the duration in microseconds that parsing is allowed to take.
*/
uint64_t ts_parser_timeout_micros(const TSParser *self);
/**
* @deprecated use [`ts_parser_parse_with_options`] and pass in a callback instead, this will be removed in 0.26.
*
* Set the parser's current cancellation flag pointer.
*
* If a non-null pointer is assigned, then the parser will periodically read
* from this pointer during parsing. If it reads a non-zero value, it will
* halt early, returning NULL. See [`ts_parser_parse`] for more information.
*/
void ts_parser_set_cancellation_flag(TSParser *self, const size_t *flag);
/**
* @deprecated use [`ts_parser_parse_with_options`] and pass in a callback instead, this will be removed in 0.26.
*
* Get the parser's current cancellation flag pointer.
*/
const size_t *ts_parser_cancellation_flag(const TSParser *self);
/**
* Set the logger that a parser should use during parsing.
*
@ -1094,26 +1049,6 @@ bool ts_query_cursor_did_exceed_match_limit(const TSQueryCursor *self);
uint32_t ts_query_cursor_match_limit(const TSQueryCursor *self);
void ts_query_cursor_set_match_limit(TSQueryCursor *self, uint32_t limit);
/**
* @deprecated use [`ts_query_cursor_exec_with_options`] and pass in a callback instead, this will be removed in 0.26.
*
* Set the maximum duration in microseconds that query execution should be allowed to
* take before halting.
*
* If query execution takes longer than this, it will halt early, returning NULL.
* See [`ts_query_cursor_next_match`] or [`ts_query_cursor_next_capture`] for more information.
*/
void ts_query_cursor_set_timeout_micros(TSQueryCursor *self, uint64_t timeout_micros);
/**
* @deprecated use [`ts_query_cursor_exec_with_options`] and pass in a callback instead, this will be removed in 0.26.
*
* Get the duration in microseconds that query execution is allowed to take.
*
* This is set via [`ts_query_cursor_set_timeout_micros`].
*/
uint64_t ts_query_cursor_timeout_micros(const TSQueryCursor *self);
/**
* Set the range of bytes in which the query will be executed.
*
@ -1264,17 +1199,6 @@ const char *ts_language_symbol_name(const TSLanguage *self, TSSymbol symbol);
*/
TSSymbolType ts_language_symbol_type(const TSLanguage *self, TSSymbol symbol);
/**
* @deprecated use [`ts_language_abi_version`] instead, this will be removed in 0.26.
*
* Get the ABI version number for this language. This version number is used
* to ensure that languages were generated by a compatible version of
* Tree-sitter.
*
* See also [`ts_parser_set_language`].
*/
uint32_t ts_language_version(const TSLanguage *self);
/**
* Get the ABI version number for this language. This version number is used
* to ensure that languages were generated by a compatible version of