tree_cursor

struct TreeCursor;
A stateful object for walking a syntax Tree efficiently.
TSTreeCursor tstreecursor;
internal TSTreeCursor
nothrow @nogc this(TSTreeCursor tstreecursor);
Create a new tree cursor
nothrow @nogc this(return ref scope TreeCursor otherTreeCursor);
Copy a tree cursor
nothrow @nogc this(TreeCursor* otherTreeCursor);
Copy a tree cursor
const nothrow @nogc auto node();
const @nogc auto field_id();
Get the numerical field id of this tree cursor's current node.
See also field_name.
const nothrow @nogc auto field_name();
Get the field name of this tree cursor's current node.
nothrow @nogc auto goto_first_child();
Move this cursor to the first child of its current node.
This returns true if the cursor successfully moved, and returns false if there were no children.
nothrow @nogc auto goto_parent();
Move this cursor to the parent of its current node.
This returns true if the cursor successfully moved, and returns false if there was no parent node (the cursor was already on the root node).
nothrow @nogc auto goto_next_sibling();
Move this cursor to the next sibling of its current node.
This returns true if the cursor successfully moved, and returns false if there was no next sibling node.
auto goto_first_child_for_byte(size_t index);
Move this cursor to the first child of its current node that extends beyond the given byte offset.
This returns the index of the child node if one was found, and returns None if no such child was found.
nothrow @nogc auto reset(Node node);
Re-initialize this tree cursor to start at a different node.