Trait for language-specific source code extractors. Each implementation handles a single programming language, using tree-sitter to parse source and emit graph nodes and edges.
| 204 | /// Each implementation handles a single programming language, |
| 205 | /// using tree-sitter to parse source and emit graph nodes and edges. |
| 206 | pub trait LanguageExtractor: Send + Sync { |
| 207 | /// File extensions this extractor handles (without leading dot). |
| 208 | fn extensions(&self) -> &[&str]; |
| 209 | |
| 210 | /// Human-readable language name. |
| 211 | fn language_name(&self) -> &str; |
| 212 | |
| 213 | /// Extract nodes, edges, and unresolved refs from source code. |
| 214 | /// |
| 215 | /// `file_path` is the relative path used for qualified names and node IDs. |
| 216 | /// `source` is the source code to parse. |
| 217 | fn extract(&self, file_path: &str, source: &str) -> ExtractionResult; |
| 218 | } |
| 219 | |
| 220 | /// Registry of all available language extractors. |
| 221 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected