Skip to main content

extract_cpp_symbols

Function extract_cpp_symbols 

Source
pub fn extract_cpp_symbols(path: &Path, source: &[u8]) -> Result<Vec<CppSymbol>>
Expand description

Extract symbols and spans from a C/C++ source file.

Uses tree-sitter-cpp to parse the file and extract:

  • Functions with signatures and bodies
  • Class definitions with methods
  • Struct definitions
  • Namespace definitions
  • Enum definitions
  • Template declarations

Returns a list of symbol entries ready for graph insertion.