use crate::types::{CodeChunk, KgGraph};
#[derive(Debug, Default)]
pub struct StaticAnalysisResult {
pub graph: KgGraph,
pub analyzed_files: usize,
pub analyzed_chunks: usize,
pub errors: Vec<String>,
}
pub trait LanguageAnalyzer: Send + Sync {
fn language(&self) -> &str;
fn supported_extensions(&self) -> &[&str];
fn analyze_chunks(&self, chunks: &[CodeChunk]) -> StaticAnalysisResult;
fn supports(&self, file: &str) -> bool {
let lower = file.to_lowercase();
self.supported_extensions()
.iter()
.any(|ext| lower.ends_with(ext))
}
}