Previous: , Up: Parsing Program Source   [Contents][Index]


37.7 Tree-sitter C API Correspondence

Emacs’ tree-sitter integration doesn’t expose every feature tree-sitter’s C API provides. Missing features include:

In addition, Emacs makes some changes to the C API to make the API more convenient and idiomatic:

Below is the correspondence between all C API functions and their ELisp counterparts. Sometimes one ELisp function corresponds to multiple C functions, and many C functions don’t have an ELisp counterpart.

ts_parser_new                           tree-sitter-parser-create
ts_parser_delete
ts_parser_set_language
ts_parser_language                      tree-sitter-parser-language
ts_parser_set_included_ranges           tree-sitter-parser-set-included-ranges
ts_parser_included_ranges               tree-sitter-parser-included-ranges
ts_parser_parse
ts_parser_parse_string                  tree-sitter-parse-string
ts_parser_parse_string_encoding
ts_parser_reset
ts_parser_set_timeout_micros
ts_parser_timeout_micros
ts_parser_set_cancellation_flag
ts_parser_cancellation_flag
ts_parser_set_logger
ts_parser_logger
ts_parser_print_dot_graphs
ts_tree_copy
ts_tree_delete
ts_tree_root_node
ts_tree_language
ts_tree_edit
ts_tree_get_changed_ranges
ts_tree_print_dot_graph
ts_node_type                            tree-sitter-node-type
ts_node_symbol
ts_node_start_byte                      tree-sitter-node-start
ts_node_start_point
ts_node_end_byte                        tree-sitter-node-end
ts_node_end_point
ts_node_string                          tree-sitter-node-string
ts_node_is_null
ts_node_is_named                        tree-sitter-node-check
ts_node_is_missing                      tree-sitter-node-check
ts_node_is_extra                        tree-sitter-node-check
ts_node_has_changes                     tree-sitter-node-check
ts_node_has_error                       tree-sitter-node-check
ts_node_parent                          tree-sitter-node-parent
ts_node_child                           tree-sitter-node-child
ts_node_field_name_for_child            tree-sitter-node-field-name-for-child
ts_node_child_count                     tree-sitter-node-child-count
ts_node_named_child                     tree-sitter-node-child
ts_node_named_child_count               tree-sitter-node-child-count
ts_node_child_by_field_name             tree-sitter-node-by-field-name
ts_node_child_by_field_id
ts_node_next_sibling                    tree-sitter-next-sibling
ts_node_prev_sibling                    tree-sitter-prev-sibling
ts_node_next_named_sibling              tree-sitter-next-sibling
ts_node_prev_named_sibling              tree-sitter-prev-sibling
ts_node_first_child_for_byte            tree-sitter-first-child-for-pos
ts_node_first_named_child_for_byte      tree-sitter-first-child-for-pos
ts_node_descendant_for_byte_range       tree-sitter-descendant-for-range
ts_node_descendant_for_point_range
ts_node_named_descendant_for_byte_range tree-sitter-descendant-for-range
ts_node_named_descendant_for_point_range
ts_node_edit
ts_node_eq                              tree-sitter-node-eq
ts_tree_cursor_new
ts_tree_cursor_delete
ts_tree_cursor_reset
ts_tree_cursor_current_node
ts_tree_cursor_current_field_name
ts_tree_cursor_current_field_id
ts_tree_cursor_goto_parent
ts_tree_cursor_goto_next_sibling
ts_tree_cursor_goto_first_child
ts_tree_cursor_goto_first_child_for_byte
ts_tree_cursor_goto_first_child_for_point
ts_tree_cursor_copy
ts_query_new
ts_query_delete
ts_query_pattern_count
ts_query_capture_count
ts_query_string_count
ts_query_start_byte_for_pattern
ts_query_predicates_for_pattern
ts_query_step_is_definite
ts_query_capture_name_for_id
ts_query_string_value_for_id
ts_query_disable_capture
ts_query_disable_pattern
ts_query_cursor_new
ts_query_cursor_delete
ts_query_cursor_exec                    tree-sitter-query-capture
ts_query_cursor_did_exceed_match_limit
ts_query_cursor_match_limit
ts_query_cursor_set_match_limit
ts_query_cursor_set_byte_range
ts_query_cursor_set_point_range
ts_query_cursor_next_match
ts_query_cursor_remove_match
ts_query_cursor_next_capture
ts_language_symbol_count
ts_language_symbol_name
ts_language_symbol_for_name
ts_language_field_count
ts_language_field_name_for_id
ts_language_field_id_for_name
ts_language_symbol_type
ts_language_version

Previous: Parsing Text in Multiple Languages, Up: Parsing Program Source   [Contents][Index]