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

Method extract_instantiation

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

Source from the content-addressed store, hash-verified

954 // --- extractInstantiation (:4610, scala arm :4647-4662) ---------------
955
956 fn extract_instantiation(&mut self, node: Node<'t>) {
957 if self.stack.is_empty() {
958 return;
959 }
960 let from_row = self.top_row();
961 let ctor = node
962 .child_by_field_name("constructor")
963 .or_else(|| node.child_by_field_name("type"))
964 .or_else(|| node.child_by_field_name("name"))
965 .or_else(|| node.named_child(0));
966 let Some(ctor) = ctor else { return };
967 if let Some(name) = self.scala_base_type_name(Some(ctor)) {
968 self.push_ref_at(from_row, &name, "instantiates", node);
969 }
970 }
971
972 // --- extractStaticMemberRef (:4750-4808) ------------------------------
973

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