treesitter: add node:field() to get field children

This commit is contained in:
Thomas Vigouroux
2020-08-14 16:01:10 +02:00
parent e123fd0a5d
commit 18217b987f
3 changed files with 60 additions and 0 deletions

View File

@@ -628,6 +628,9 @@ tsnode:iter_children() *tsnode:iter_children()*
Returns the child node plus the eventual field name corresponding to
this child node.
tsnode:field({name}) *tsnode:field()*
Returns a table of the nodes corresponding to the {name} field.
tsnode:child_count() *tsnode:child_count()*
Get the node's number of children.