Add ts_tree_root_node_with_offset API

This commit is contained in:
Max Brunsfeld 2022-08-18 13:48:47 -07:00
parent a882d0b036
commit 477b667753
5 changed files with 71 additions and 0 deletions

View file

@ -332,6 +332,15 @@ extern "C" {
#[doc = " Get the root node of the syntax tree."]
pub fn ts_tree_root_node(self_: *const TSTree) -> TSNode;
}
extern "C" {
#[doc = " Get the root node of the syntax tree, but with its position"]
#[doc = " shifted forward by the given offset."]
pub fn ts_tree_root_node_with_offset(
self_: *const TSTree,
offset_bytes: u32,
offset_point: TSPoint,
) -> TSNode;
}
extern "C" {
#[doc = " Get the language that was used to parse the syntax tree."]
pub fn ts_tree_language(arg1: *const TSTree) -> *const TSLanguage;