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

@ -366,6 +366,16 @@ void ts_tree_delete(TSTree *self);
*/
TSNode ts_tree_root_node(const TSTree *self);
/**
* Get the root node of the syntax tree, but with its position
* shifted forward by the given offset.
*/
TSNode ts_tree_root_node_with_offset(
const TSTree *self,
uint32_t offset_bytes,
TSPoint offset_point
);
/**
* Get the language that was used to parse the syntax tree.
*/