Skip to main content

parse_cpp_file_with_ancestry

Function parse_cpp_file_with_ancestry 

Source
pub fn parse_cpp_file_with_ancestry<'tree>(
    file: &ProjectFile,
    source: &str,
    root: Node<'tree>,
    ancestry: &ParentIndex<'tree>,
) -> ParsedFile
Expand description

Extract file under the dialect its own path selects, asking its ancestor questions of a caller-owned index over the same tree.

The index costs one hash entry per node and is a property of the tree, not of the reading, so a header that gets both readings builds it once. See parse_cpp_c_reading for the second reading.