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

Method extract_function_signature

src/extraction/lua_extractor.rs:460–472  ·  view source on GitHub ↗

Extract the function signature (first line of the definition).

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

Source from the content-addressed store, hash-verified

458
459 /// Extract the function signature (first line of the definition).
460 fn extract_function_signature(
461 state: &ExtractionState,
462 node: TsNode<'_>,
463 _class_context: Option<&str>,
464 ) -> Option<String> {
465 let text = state.node_text(node);
466 let first_line = text.lines().next()?.trim().to_string();
467 if first_line.is_empty() {
468 None
469 } else {
470 Some(first_line)
471 }
472 }
473
474 /// Extract docstrings from `--` or `---` comment lines preceding definitions.
475 ///

Callers

nothing calls this directly

Calls 2

node_textMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected