tree_sitter::ffi

Function ts_node_child_by_field_id

Source
pub unsafe extern "C" fn ts_node_child_by_field_id(
    self_: TSNode,
    field_id: TSFieldId,
) -> TSNode
Expand description

Get the node’s child with the given numerical field id.

You can convert a field name to an id using the ts_language_field_id_for_name function.