tree_sitter::ffi

Function ts_node_child_with_descendant

Source
pub unsafe extern "C" fn ts_node_child_with_descendant(
    self_: TSNode,
    descendant: TSNode,
) -> TSNode
Expand description

Get the node that contains descendant.

Note that this can return descendant itself, unlike the deprecated function ts_node_child_containing_descendant.