MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / LanguageExtractor

Interface LanguageExtractor

src/extraction/mod.rs:206–218  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

204/// Each implementation handles a single programming language,
205/// using tree-sitter to parse source and emit graph nodes and edges.
206pub 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///

Callers

nothing calls this directly

Implementers 15

ocaml_extractor.rssrc/extraction/ocaml_extractor.rs
haskell_extractor.rssrc/extraction/haskell_extractor.rs
clojure_extractor.rssrc/extraction/clojure_extractor.rs
metal_extractor.rssrc/extraction/metal_extractor.rs
dockerfile_extractor.rssrc/extraction/dockerfile_extractor.rs
elixir_extractor.rssrc/extraction/elixir_extractor.rs
qbasic_extractor.rssrc/extraction/qbasic_extractor.rs
msbasic2_extractor.rssrc/extraction/msbasic2_extractor.rs
fsharp_extractor.rssrc/extraction/fsharp_extractor.rs
quickbasic_extractor.rssrc/extraction/quickbasic_extractor.rs
lua_extractor.rssrc/extraction/lua_extractor.rs
kotlin_extractor.rssrc/extraction/kotlin_extractor.rs

Calls

no outgoing calls

Tested by

no test coverage detected