aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/treesitter/_meta/tsnode.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/lua/vim/treesitter/_meta/tsnode.lua b/runtime/lua/vim/treesitter/_meta/tsnode.lua
index 2f9d7f214a..de4b71c697 100644
--- a/runtime/lua/vim/treesitter/_meta/tsnode.lua
+++ b/runtime/lua/vim/treesitter/_meta/tsnode.lua
@@ -10,8 +10,6 @@ error('Cannot require a meta file')
---@nodoc
---@class TSNode: userdata
----@field named_children fun(self: TSNode): TSNode[]
----@field __has_ancestor fun(self: TSNode, node_types: string[]): boolean
local TSNode = {} -- luacheck: no unused
--- Get the node's immediate parent.
@@ -62,6 +60,15 @@ function TSNode:child(index) end
--- @return integer
function TSNode:named_child_count() end
+--- Returns a list of the node's named children.
+--- @return TSNode[]
+function TSNode:named_children() end
+
+--- Check if the node has any of the given node types as its ancestor.
+--- @param node_types string[]
+--- @return boolean
+function TSNode:__has_ancestor(node_types) end
+
--- Get the node's named child at the given {index}, where zero represents the
--- first named child.
--- @param index integer