Skip to main content

query_nodes

Function query_nodes 

Source
pub fn query_nodes<'a>(
    tree: &'a Tree,
    source: &str,
    query_source: &str,
    capture_name: &str,
) -> Result<Vec<Node<'a>>>
Expand description

Like run_query, but returns the matched Nodes under one named capture directly, rather than their text - for callers (migrations, routes) that need to keep walking the tree structurally from the match (e.g. into a closure argument’s own body) instead of just reading the matched text.