Skip to main content

extract_interface

Function extract_interface 

Source
pub fn extract_interface(
    path: &Path,
    source: &str,
) -> PatternsResult<InterfaceInfo>
Expand description

Extract the public interface from a source file.

Detects the language from the file extension and uses the appropriate tree-sitter grammar and node kinds. Uses sibling-aware detection so a .h header next to .cpp translation units is parsed with the C++ grammar — without this, tldr interface tinyxml2.h parses as C and returns zero classes (real-repo-fixes-v1 P9.BUG-R2).