Expand description
Code parsing module with 5-layer analysis.
This module provides functionality for extracting code units from source files across multiple programming languages. It uses tree-sitter for AST parsing and performs multi-layer analysis including:
- AST Layer: Function signatures, docstrings, parameters, return types
- Call Graph Layer: Function calls and caller relationships
- Control Flow Layer: Loops, branches, error handling, complexity
- Data Flow Layer: Variable declarations and assignments
- Dependencies Layer: Import statements and module dependencies
Re-exports§
Modules§
Functions§
- build_
call_ graph - Build call graph and populate called_by for all units.
- detect_
language - Detect language from file extension or filename.
- extract_
units - Extract all code units from a file with 5-layer analysis.
- is_
text_ format - Check if a language is a text/config format (not code parsed with tree-sitter).