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

Source from the content-addressed store, hash-verified

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

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