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

Method extract_instantiation

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

Source from the content-addressed store, hash-verified

935 // --- extractInstantiation (:4610, scala arm :4647-4662) ---------------
936
937 fn extract_instantiation(&mut self, node: Node<'t>) {
938 if self.stack.is_empty() {
939 return;
940 }
941 let from_row = self.top_row();
942 let ctor = node
943 .child_by_field_name("constructor")
944 .or_else(|| node.child_by_field_name("type"))
945 .or_else(|| node.child_by_field_name("name"))
946 .or_else(|| node.named_child(0));
947 let Some(ctor) = ctor else { return };
948 if let Some(name) = self.scala_base_type_name(Some(ctor)) {
949 self.push_ref_at(from_row, &name, "instantiates", node);
950 }
951 }
952
953 // --- extractStaticMemberRef (:4750-4808) ------------------------------
954

Callers 2

visitMethod · 0.45
visit_bodyMethod · 0.45

Calls 3

scala_base_type_nameMethod · 0.80
top_rowMethod · 0.45
push_ref_atMethod · 0.45

Tested by

no test coverage detected