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

Method extract_docstring

src/extraction/bash_extractor.rs:365–367  ·  view source on GitHub ↗

Extract docstrings from `# comment` lines preceding definitions. Bash uses comment lines (# ...) as documentation. We look for `comment` sibling nodes that immediately precede the given definition node.

(state: &ExtractionState, node: TsNode<'_>)

Source from the content-addressed store, hash-verified

363 /// Bash uses comment lines (# ...) as documentation. We look for `comment`
364 /// sibling nodes that immediately precede the given definition node.
365 fn extract_docstring(state: &ExtractionState, node: TsNode<'_>) -> Option<String> {
366 docstring_from_hash_comments(&state.source, node)
367 }
368
369 /// Recursively find command nodes inside a given node and create unresolved Calls references.
370 fn extract_call_sites(state: &mut ExtractionState, node: TsNode<'_>, fn_node_id: &str) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected