Skip to main content

collect_cpp_includes

Function collect_cpp_includes 

Source
pub fn collect_cpp_includes(
    root: Node<'_>,
    source: &str,
    parsed: &mut ParsedFile,
)
Expand description

Every #include directive the tree holds, in source order.

A preorder sweep rather than a step of the declaration walk: the container walk descends only through declaration scopes, so an include written inside a class body or a function body would otherwise never be seen, and an include is an include wherever it is written.