MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / visit_for_calls_and_structure

Method visit_for_calls_and_structure

codegraph-kernel/src/go.rs:460–484  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

458 }
459
460 fn visit_for_calls_and_structure(&mut self, node: Node<'t>) {
461 stack_guard!();
462 let kind = node.kind();
463 self.maybe_capture_fn_refs(node);
464
465 if kind == "call_expression" {
466 self.extract_call(node);
467 } else if kind == "composite_literal" {
468 self.extract_instantiation(node);
469 }
470
471 if kind == "function_declaration" {
472 let name = self.extract_name(node);
473 if name != "<anonymous>" {
474 self.extract_function(node);
475 return;
476 }
477 }
478
479 for i in 0..node.named_child_count() {
480 if let Some(c) = node.named_child(i) {
481 self.visit_for_calls_and_structure(c);
482 }
483 }
484 }
485
486 // --- extractors --------------------------------------------------------------
487

Callers 1

visit_function_bodyMethod · 0.45

Calls 5

maybe_capture_fn_refsMethod · 0.45
extract_callMethod · 0.45
extract_instantiationMethod · 0.45
extract_nameMethod · 0.45
extract_functionMethod · 0.45

Tested by

no test coverage detected