From 618146260e5e6e6cfc61178b582540f7a8fc20ba Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 8 Nov 2022 17:47:57 -0800 Subject: [PATCH] Add doc comments for tree included ranges getter --- lib/binding_rust/lib.rs | 1 + lib/include/tree_sitter/api.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/binding_rust/lib.rs b/lib/binding_rust/lib.rs index 9245e417..870d177b 100644 --- a/lib/binding_rust/lib.rs +++ b/lib/binding_rust/lib.rs @@ -764,6 +764,7 @@ impl Tree { } } + /// Get the included ranges that were used to parse the syntax tree. pub fn included_ranges(&self) -> Vec { let mut count = 0u32; unsafe { diff --git a/lib/include/tree_sitter/api.h b/lib/include/tree_sitter/api.h index 5e9ce753..bc05bc3c 100644 --- a/lib/include/tree_sitter/api.h +++ b/lib/include/tree_sitter/api.h @@ -381,6 +381,11 @@ TSNode ts_tree_root_node_with_offset( */ const TSLanguage *ts_tree_language(const TSTree *); +/** + * Get the array of included ranges that was used to parse the syntax tree. + * + * The returned pointer must be freed by the caller. + */ TSRange *ts_tree_included_ranges(const TSTree *, uint32_t *length); /**