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

Method extract_calls

src/extraction/fsharp_extractor.rs:450–478  ·  view source on GitHub ↗
(state: &mut ExtractionState, node: TsNode<'_>, fn_id: &str)

Source from the content-addressed store, hash-verified

448 }
449
450 fn extract_calls(state: &mut ExtractionState, node: TsNode<'_>, fn_id: &str) {
451 let mut cursor = node.walk();
452 if cursor.goto_first_child() {
453 loop {
454 let child = cursor.node();
455 match child.kind() {
456 "application_expression" => {
457 if let Some(callee) = child.child(0) {
458 let name = state.node_text(callee);
459 state.unresolved_refs.push(UnresolvedRef {
460 from_node_id: fn_id.to_string(),
461 reference_name: name,
462 reference_kind: EdgeKind::Calls,
463 line: child.start_position().row as u32,
464 column: child.start_position().column as u32,
465 file_path: state.file_path.clone(),
466 });
467 }
468 Self::extract_calls(state, child, fn_id);
469 }
470 "function_or_value_defn" | "type_definition" => {}
471 _ => Self::extract_calls(state, child, fn_id),
472 }
473 if !cursor.goto_next_sibling() {
474 break;
475 }
476 }
477 }
478 }
479
480 fn extract_docstring(state: &ExtractionState, node: TsNode<'_>) -> Option<String> {
481 // F# XML doc comments: /// text

Callers

nothing calls this directly

Calls 3

kindMethod · 0.80
pushMethod · 0.80
node_textMethod · 0.45

Tested by

no test coverage detected