Uses of Class
io.github.treesitter.jtreesitter.Node
-
Uses of Node in io.github.treesitter.jtreesitter
Modifier and TypeMethodDescriptionTreeCursor.getCurrentNode()
Get the current node of the cursor.Tree.getRootNode()
Get the root node of the syntax tree.Tree.getRootNodeWithOffset
(int bytes, Point extent) Get the root node of the syntax tree, but with its position shifted forward by the given offset.QueryCapture.node()
Returns the value of thenode
record component.Modifier and TypeMethodDescriptionFind the nodes that are captured by the given capture name.Node.getChild
(int index) Get the node's child at the given index, if any.Node.getChildByFieldId
(short id) Get the node's first child with the given field ID, if any.Node.getChildByFieldName
(String name) Get the node's first child with the given field name, if any.Node.getChildContainingDescendant
(Node descendant) Deprecated, for removal: This API element is subject to removal in a future version.Node.getChildren()
Get this node's children.Node.getChildrenByFieldId
(short id) Get a list of the node's children with the given field ID.Node.getChildrenByFieldName
(String name) Get a list of the node's child with the given field name.Node.getChildWithDescendant
(Node descendant) Get the node that contains the given descendant, if any.Node.getDescendant
(int start, int end) Get the smallest node within this node that spans the given byte range, if any.Node.getDescendant
(Point start, Point end) Get the smallest node within this node that spans the given point range, if any.Node.getNamedChild
(int index) Get the node's named child at the given index, if any.Node.getNamedChildren()
Get this node's named children.Node.getNamedDescendant
(int start, int end) Get the smallest named node within this node that spans the given byte range, if any.Node.getNamedDescendant
(Point start, Point end) Get the smallest named node within this node that spans the given point range, if any.Node.getNextNamedSibling()
The node's next named sibling, if any.Node.getNextSibling()
The node's next sibling, if any.Node.getParent()
The node's immediate parent, if any.Node.getPrevNamedSibling()
The node's previous named sibling, if any.Node.getPrevSibling()
The node's previous sibling, if any.Modifier and TypeMethodDescriptionQuery.findMatches
(Node node) Iterate over all the matches in the order that they were found.Query.findMatches
(Node node, @Nullable BiPredicate<QueryPredicate, QueryMatch> predicate) Iterate over all the matches in the order that they were found.Node.getChildContainingDescendant
(Node descendant) Deprecated, for removal: This API element is subject to removal in a future version.Node.getChildWithDescendant
(Node descendant) Get the node that contains the given descendant, if any.void
Reset the cursor to start at a different node.ModifierConstructorDescriptionQueryCapture
(String name, Node node) Creates an instance of aQueryCapture
record class.
getChildWithDescendant(io.github.treesitter.jtreesitter.Node)
instead.