use std::path::{Path, PathBuf};
use anyhow::Result;
use tree_sitter::Tree;
use crate::types::{Component, Dependency};
pub struct ParsedFile {
pub path: PathBuf,
pub tree: Tree,
pub content: String,
}
pub trait LanguageAnalyzer: Send + Sync {
fn language(&self) -> &'static str;
fn file_extensions(&self) -> &[&str];
fn parse_file(&self, path: &Path, content: &str) -> Result<ParsedFile>;
fn extract_components(&self, parsed: &ParsedFile) -> Vec<Component>;
fn extract_dependencies(&self, parsed: &ParsedFile) -> Vec<Dependency>;
}