refactor: deepen modules, consolidate inference, delete dead code
- Extract build_graph/load_config/create_renderer in presentation (393→~250 lines) - Move module inference into ModuleName::from_path(), delete 3 scattered copies - Move resolve_relationships/filter_external_imports into CodeGraph - Add LanguageExtractor trait in tree-sitter adapter - Add CodeGraph::elements_by_module(), replace 6 identical grouping loops - Delete dead RenderDiagrams query
This commit is contained in:
@@ -7,6 +7,16 @@ use archlens_domain::{
|
||||
Relationship, RelationshipKind,
|
||||
};
|
||||
|
||||
use crate::language_extractor::LanguageExtractor;
|
||||
|
||||
pub struct PythonExtractor;
|
||||
|
||||
impl LanguageExtractor for PythonExtractor {
|
||||
fn analyze(&self, source: &str, file_path: &FilePath) -> Result<AnalysisResult, DomainError> {
|
||||
analyze(source, file_path)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn analyze(source: &str, file_path: &FilePath) -> Result<AnalysisResult, DomainError> {
|
||||
let mut parser = Parser::new();
|
||||
parser
|
||||
|
||||
Reference in New Issue
Block a user