tree_sitter::ffi

Function ts_tree_cursor_goto_last_child

Source
pub unsafe extern "C" fn ts_tree_cursor_goto_last_child(
    self_: *mut TSTreeCursor,
) -> bool
Expand description

Move the cursor to the last child of its current node.

This returns true if the cursor successfully moved, and returns false if there were no children.

Note that this function may be slower than ts_tree_cursor_goto_first_child because it needs to iterate through all the children to compute the child’s position.