1 #ifndef TREE_SITTER_API_H_
2 #define TREE_SITTER_API_H_
24 #define TREE_SITTER_LANGUAGE_VERSION 14
30 #define TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION 13
939 void *(*new_malloc)(
size_t),
940 void *(*new_calloc)(
size_t,
size_t),
941 void *(*new_realloc)(
void *,
size_t),
942 void (*new_free)(
void *)
void ts_query_cursor_exec(TSQueryCursor *, const TSQuery *, TSNode)
TSNode ts_node_descendant_for_byte_range(TSNode, uint32_t, uint32_t)
bool ts_node_has_changes(TSNode)
TSQuantifier ts_query_capture_quantifier_for_id(const TSQuery *, uint32_t pattern_id, uint32_t capture_id)
const char * ts_node_type(TSNode)
void ts_tree_edit(TSTree *self, const TSInputEdit *edit)
TSLogger ts_parser_logger(const TSParser *self)
TSRange * ts_tree_get_changed_ranges(const TSTree *old_tree, const TSTree *new_tree, uint32_t *length)
TSNode ts_node_child_by_field_id(TSNode, TSFieldId)
TSTree * ts_parser_parse(TSParser *self, const TSTree *old_tree, TSInput input)
void ts_query_cursor_set_match_limit(TSQueryCursor *, uint32_t)
bool ts_tree_cursor_goto_next_sibling(TSTreeCursor *)
TSNode ts_node_first_named_child_for_byte(TSNode, uint32_t)
@ TSQueryPredicateStepTypeString
@ TSQueryPredicateStepTypeDone
@ TSQueryPredicateStepTypeCapture
void ts_parser_delete(TSParser *parser)
void ts_tree_cursor_delete(TSTreeCursor *)
const TSRange * ts_parser_included_ranges(const TSParser *self, uint32_t *length)
const char * ts_query_string_value_for_id(const TSQuery *, uint32_t id, uint32_t *length)
void ts_tree_print_dot_graph(const TSTree *, FILE *)
TSNode ts_node_named_child(TSNode, uint32_t)
bool ts_node_is_extra(TSNode)
TSNode ts_node_next_named_sibling(TSNode)
uint32_t ts_node_start_byte(TSNode)
char * ts_node_string(TSNode)
TSNode ts_node_child(TSNode, uint32_t)
uint32_t ts_node_named_child_count(TSNode)
void ts_parser_reset(TSParser *self)
void ts_tree_cursor_reset(TSTreeCursor *, TSNode)
const char * ts_node_field_name_for_child(TSNode, uint32_t)
bool ts_node_is_null(TSNode)
bool ts_query_cursor_did_exceed_match_limit(const TSQueryCursor *)
TSQuery * ts_query_new(const TSLanguage *language, const char *source, uint32_t source_len, uint32_t *error_offset, TSQueryError *error_type)
uint32_t ts_query_string_count(const TSQuery *)
uint64_t ts_parser_timeout_micros(const TSParser *self)
const TSLanguage * ts_tree_language(const TSTree *)
TSTree * ts_tree_copy(const TSTree *self)
uint32_t ts_query_pattern_count(const TSQuery *)
const size_t * ts_parser_cancellation_flag(const TSParser *self)
void ts_query_cursor_set_byte_range(TSQueryCursor *, uint32_t, uint32_t)
TSNode ts_node_prev_named_sibling(TSNode)
TSNode ts_node_prev_sibling(TSNode)
TSNode ts_node_child_by_field_name(TSNode self, const char *field_name, uint32_t field_name_length)
TSSymbol ts_node_symbol(TSNode)
void ts_tree_delete(TSTree *self)
void ts_parser_set_timeout_micros(TSParser *self, uint64_t timeout)
void ts_node_edit(TSNode *, const TSInputEdit *)
bool ts_parser_set_included_ranges(TSParser *self, const TSRange *ranges, uint32_t length)
void ts_query_cursor_delete(TSQueryCursor *)
uint32_t ts_query_start_byte_for_pattern(const TSQuery *, uint32_t)
TSPoint ts_node_start_point(TSNode)
TSFieldId ts_language_field_id_for_name(const TSLanguage *, const char *, uint32_t)
const char * ts_language_symbol_name(const TSLanguage *, TSSymbol)
void ts_query_disable_capture(TSQuery *, const char *, uint32_t)
bool ts_query_cursor_next_match(TSQueryCursor *, TSQueryMatch *match)
bool ts_node_is_missing(TSNode)
bool ts_node_eq(TSNode, TSNode)
int64_t ts_tree_cursor_goto_first_child_for_point(TSTreeCursor *, TSPoint)
void ts_query_cursor_remove_match(TSQueryCursor *, uint32_t id)
uint32_t ts_query_cursor_match_limit(const TSQueryCursor *)
TSTreeCursor ts_tree_cursor_new(TSNode)
TSNode ts_tree_root_node(const TSTree *self)
uint32_t ts_language_version(const TSLanguage *)
bool ts_tree_cursor_goto_parent(TSTreeCursor *)
void ts_parser_set_logger(TSParser *self, TSLogger logger)
TSTreeCursor ts_tree_cursor_copy(const TSTreeCursor *)
TSQueryCursor * ts_query_cursor_new(void)
bool ts_parser_set_language(TSParser *self, const TSLanguage *language)
uint32_t ts_node_child_count(TSNode)
TSTree * ts_parser_parse_string_encoding(TSParser *self, const TSTree *old_tree, const char *string, uint32_t length, TSInputEncoding encoding)
bool ts_node_has_error(TSNode)
int64_t ts_tree_cursor_goto_first_child_for_byte(TSTreeCursor *, uint32_t)
void ts_parser_set_cancellation_flag(TSParser *self, const size_t *flag)
TSNode ts_node_first_child_for_byte(TSNode, uint32_t)
const char * ts_language_field_name_for_id(const TSLanguage *, TSFieldId)
uint32_t ts_query_capture_count(const TSQuery *)
uint32_t ts_node_end_byte(TSNode)
bool ts_query_is_pattern_guaranteed_at_step(const TSQuery *self, uint32_t byte_offset)
TSParser * ts_parser_new(void)
const char * ts_query_capture_name_for_id(const TSQuery *, uint32_t id, uint32_t *length)
TSFieldId ts_tree_cursor_current_field_id(const TSTreeCursor *)
bool ts_node_is_named(TSNode)
bool ts_query_cursor_next_capture(TSQueryCursor *, TSQueryMatch *match, uint32_t *capture_index)
void ts_set_allocator(void *(*new_malloc)(size_t), void *(*new_calloc)(size_t, size_t), void *(*new_realloc)(void *, size_t), void(*new_free)(void *))
uint32_t ts_language_symbol_count(const TSLanguage *)
void ts_query_disable_pattern(TSQuery *, uint32_t)
const TSQueryPredicateStep * ts_query_predicates_for_pattern(const TSQuery *self, uint32_t pattern_index, uint32_t *length)
TSNode ts_node_parent(TSNode)
TSTree * ts_parser_parse_string(TSParser *self, const TSTree *old_tree, const char *string, uint32_t length)
TSNode ts_node_named_descendant_for_point_range(TSNode, TSPoint, TSPoint)
void ts_parser_print_dot_graphs(TSParser *self, int file)
TSSymbolType ts_language_symbol_type(const TSLanguage *, TSSymbol)
TSNode ts_tree_cursor_current_node(const TSTreeCursor *)
TSSymbol ts_language_symbol_for_name(const TSLanguage *self, const char *string, uint32_t length, bool is_named)
void ts_query_cursor_set_point_range(TSQueryCursor *, TSPoint, TSPoint)
uint32_t ts_language_field_count(const TSLanguage *)
TSNode ts_node_descendant_for_point_range(TSNode, TSPoint, TSPoint)
TSNode ts_node_next_sibling(TSNode)
TSPoint ts_node_end_point(TSNode)
void ts_query_delete(TSQuery *)
const TSLanguage * ts_parser_language(const TSParser *self)
const char * ts_tree_cursor_current_field_name(const TSTreeCursor *)
TSNode ts_node_named_descendant_for_byte_range(TSNode, uint32_t, uint32_t)
bool ts_tree_cursor_goto_first_child(TSTreeCursor *)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
const TSQueryCapture * captures
TSQueryPredicateStepType type
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)