Expand description
Semantic analysis module for context-creator
This module provides language-agnostic semantic analysis capabilities including:
- Import/dependency tracing
- Function call analysis
- Type dependency tracking
Re-exports§
pub use cache::AstCacheV2;pub use analyzer::LanguageAnalyzer;pub use analyzer::SemanticContext;pub use analyzer::SemanticResult;pub use resolver::ModuleResolver;pub use resolver::ResolvedPath;pub use self::get_resolver_for_file as get_module_resolver_for_file;
Modules§
- analyzer
- Base trait and types for language-specific semantic analyzers
- cache
- Modern async cache implementation using moka and parser pools Provides bounded memory usage and timeout protection
- cycle_
detector - Cycle detection module using Tarjan’s algorithm
- dependency_
types - Rich dependency graph types for semantic analysis
- function_
call_ index - Function call index for efficient caller lookup
- graph_
builder - Graph construction module for semantic analysis
- graph_
traverser - Graph traversal module for semantic analysis
- languages
- Language-specific semantic analyzers
- parallel_
analyzer - Parallel file analysis module for semantic analysis
- parser_
pool - Thread-safe parser pool for tree-sitter parsers Manages parser lifecycle and prevents resource exhaustion
- path_
validator - Secure path validation - KISS implementation
- query_
engine - Tree-sitter query engine for efficient semantic analysis
- resolver
- Module resolution for converting import strings to file paths
- type_
resolver - Type resolution with circuit breakers to prevent infinite loops and resource exhaustion
Structs§
- Semantic
Options - Semantic analysis options
Functions§
- get_
analyzer_ for_ file - Get the appropriate language analyzer for a file
- get_
resolver_ for_ file - Get the appropriate module resolver for a file