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

Method extract_static_member_ref

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

Source from the content-addressed store, hash-verified

1516 // --- extractStaticMemberRef — the dart branch (:4759-4767) ------------
1517
1518 fn extract_static_member_ref(&mut self, node: Node<'t>) {
1519 if self.stack.is_empty() {
1520 return;
1521 }
1522 let owner_row = self.top_row();
1523 if node.kind() != "selector" {
1524 return;
1525 }
1526 let mut cursor = node.walk();
1527 if node.named_children(&mut cursor).any(|c| c.kind() == "argument_part") {
1528 return;
1529 }
1530 let Some(prev) = self.receiver_of(node) else { return };
1531 if prev.kind() == "identifier" && cap_ident_re().is_match(self.text(prev)) {
1532 // `Map` in `x.read<Map<K, V>>(y)` parsed as comparisons is a type
1533 // argument, which the body walker references as a type.
1534 if let Some(before) = prev.prev_named_sibling() {
1535 if before.kind() == "relational_operator" && self.misparsed_generic_call(before).is_some() {
1536 return;
1537 }
1538 }
1539 let name = self.text(prev).to_string();
1540 // NO callee-of-call skip — `ConfigT.load()` double-emits
1541 // (references + calls). Position = the IDENTIFIER (receiver).
1542 self.push_ref_at(owner_row, &name, "references", prev);
1543 }
1544 }
1545
1546 // --- extractDecoratorsFor (:4897-5024) — the sibling scan -------------
1547

Callers 1

visit_bodyMethod · 0.45

Calls 7

walkMethod · 0.80
receiver_ofMethod · 0.80
cap_ident_reFunction · 0.70
textMethod · 0.65
top_rowMethod · 0.45
push_ref_atMethod · 0.45

Tested by

no test coverage detected