Module semantic

Source
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§

SemanticOptions
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