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

Function try_language

src/extraction/ts_provider.rs:139–144  ·  view source on GitHub ↗

Returns the `tree_sitter::Language` for the given extractor language key.

(key: &str)

Source from the content-addressed store, hash-verified

137
138/// Returns the `tree_sitter::Language` for the given extractor language key.
139pub fn try_language(key: &str) -> Result<Language, String> {
140 LANGUAGES
141 .get(key)
142 .cloned()
143 .ok_or_else(|| format!("ts_provider: unknown language key '{key}'"))
144}
145
146/// Backward-compatible fallible alias for extractor parser call sites.
147pub fn language(key: &str) -> Result<Language, String> {

Callers 15

parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
languageFunction · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85
parse_sourceMethod · 0.85

Calls

no outgoing calls

Tested by 1