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

Method extract_declaration_signature

src/extraction/java_extractor.rs:994–1002  ·  view source on GitHub ↗

Extract the declaration signature (text from start up to the opening `{`).

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

Source from the content-addressed store, hash-verified

992
993 /// Extract the declaration signature (text from start up to the opening `{`).
994 fn extract_declaration_signature(state: &ExtractionState, node: TsNode<'_>) -> String {
995 let text = state.node_text(node);
996 if let Some(brace_pos) = text.find('{') {
997 text[..brace_pos].trim().to_string()
998 } else {
999 // For declarations without a body (e.g., abstract methods ending with `;`).
1000 text.trim_end_matches(';').trim().to_string()
1001 }
1002 }
1003
1004 /// Extract Java-style doc comments (/** ... */) preceding a declaration.
1005 fn extract_java_docstring(state: &ExtractionState, node: TsNode<'_>) -> Option<String> {

Callers

nothing calls this directly

Calls 1

node_textMethod · 0.45

Tested by

no test coverage detected