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

Method parse_source

src/extraction/fsharp_extractor.rs:109–118  ·  view source on GitHub ↗
(source: &str)

Source from the content-addressed store, hash-verified

107 }
108
109 fn parse_source(source: &str) -> Result<Tree, String> {
110 let mut parser = Parser::new();
111 let language = crate::extraction::ts_provider::try_language("fsharp")?;
112 parser
113 .set_language(&language)
114 .map_err(|e| format!("failed to load F# grammar: {e}"))?;
115 parser
116 .parse(source, None)
117 .ok_or_else(|| "tree-sitter parse returned None".to_string())
118 }
119
120 fn visit_children(state: &mut ExtractionState, node: TsNode<'_>) {
121 let mut cursor = node.walk();

Callers

nothing calls this directly

Calls 2

try_languageFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected