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:456–478  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

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

Callers 1

visit_function_bodyMethod · 0.45

Calls 6

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

Tested by

no test coverage detected