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

Source from the content-addressed store, hash-verified

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

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