Skip to main content

include_path_from_node

Function include_path_from_node 

Source
pub fn include_path_from_node<'a>(
    node: Node<'_>,
    source: &'a str,
) -> Option<(&'a str, bool)>
Expand description

Return the literal path and delimiter kind from one parsed #include.

The path is read from the grammar’s path child, so malformed directives and arbitrary source text never become include facts. Only the fixed delimiters represented by tree-sitter’s literal node kinds are removed.