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

Source from the content-addressed store, hash-verified

423 }
424
425 fn visit_for_calls_and_structure(&mut self, node: Node<'t>) {
426 stack_guard!();
427 let kind = node.kind();
428 self.maybe_capture_fn_refs(node);
429
430 if kind == "call_expression" {
431 self.extract_call(node);
432 } else if kind == "composite_literal" {
433 self.extract_instantiation(node);
434 }
435
436 if kind == "function_declaration" {
437 let name = self.extract_name(node);
438 if name != "<anonymous>" {
439 self.extract_function(node);
440 return;
441 }
442 }
443
444 for i in 0..node.named_child_count() {
445 if let Some(c) = node.named_child(i) {
446 self.visit_for_calls_and_structure(c);
447 }
448 }
449 }
450
451 // --- extractors --------------------------------------------------------------
452

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