Struct tree_sitter::TreeCursor [−][src]
pub struct TreeCursor<'a>(_, _);
Expand description
A stateful object for walking a syntax Tree
efficiently.
Implementations
Get the numerical field id of this tree cursor’s current node.
See also field_name.
Get the field name of this tree cursor’s current node.
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.
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).
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.
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.
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.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for TreeCursor<'a>
impl<'a> !Send for TreeCursor<'a>
impl<'a> !Sync for TreeCursor<'a>
impl<'a> Unpin for TreeCursor<'a>
impl<'a> UnwindSafe for TreeCursor<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more