From 140084180e82bea3afafa32a33fee37e6e9473ca Mon Sep 17 00:00:00 2001 From: Dylan Kendal Date: Fri, 20 Aug 2021 01:35:25 -0400 Subject: feat(treesitter): add next, prev sibling method Add tsnode methods to change to the next, previous, named or unnamed nodes. --- runtime/doc/treesitter.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 906e2d716a..379523722e 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -86,6 +86,18 @@ Node methods *lua-treesitter-node* tsnode:parent() *tsnode:parent()* Get the node's immediate parent. +tsnode:next_sibling() *tsnode:next_sibling()* + Get the node's next sibling. + +tsnode:prev_sibling() *tsnode:prev_sibling()* + Get the node's previous sibling. + +tsnode:next_named_sibling() *tsnode:next_named_sibling()* + Get the node's next named sibling. + +tsnode:prev_named_sibling() *tsnode:prev_named_sibling()* + Get the node's previous named sibling. + tsnode:iter_children() *tsnode:iter_children()* Iterates over all the direct children of {tsnode}, regardless of wether they are named or not. -- cgit