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

Method extract_instantiation

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

Source from the content-addressed store, hash-verified

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

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