Uses of Class
io.github.treesitter.jtreesitter.Node
-
Uses of Node in io.github.treesitter.jtreesitter
Methods in io.github.treesitter.jtreesitter that return NodeModifier and TypeMethodDescriptionTreeCursor.getCurrentNode()
Get the current node of the cursor.TreeCursor.getCurrentNode
(SegmentAllocator allocator) Get the current node of the cursor using the given allocator.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.Methods in io.github.treesitter.jtreesitter that return types with arguments of type NodeModifier 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.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.getFirstChildForByte
(int byte_offset) Get the node's first child that contains or starts after the given byte offset.Node.getFirstNamedChildForByte
(int byte_offset) Get the node's first named child that contains or starts after the given byte offset.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.Methods in io.github.treesitter.jtreesitter with parameters of type NodeModifier and TypeMethodDescriptionQueryCursor.findCaptures
(Node node) Iterate over all the captures in the order that they were found.QueryCursor.findCaptures
(Node node, QueryCursor.Options options) Iterate over all the captures in the order that they were found.QueryCursor.findCaptures
(Node node, SegmentAllocator allocator, QueryCursor.Options options) Iterate over all the captures in the order that they were found.QueryCursor.findMatches
(Node node) Iterate over all the matches in the order that they were found.QueryCursor.findMatches
(Node node, QueryCursor.Options options) Iterate over all the matches in the order that they were found.QueryCursor.findMatches
(Node node, SegmentAllocator allocator, QueryCursor.Options options) Iterate over all the matches in the order that they were found, using the given allocator.Node.getChildWithDescendant
(Node descendant) Get the node that contains the given descendant, if any.void
Reset the cursor to start at a different node.Constructors in io.github.treesitter.jtreesitter with parameters of type NodeModifierConstructorDescriptionQueryCapture
(String name, Node node) Creates an instance of aQueryCapture
record class.