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

Method extract_primary_ctor_param_refs

codegraph-kernel/src/csharp.rs:1369–1383  ·  view source on GitHub ↗

extractCsharpPrimaryCtorParamRefs (5938) — the class/struct/record primary constructor's parameter_list (an unnamed-field child).

(&mut self, node: Node<'t>, owner_row: u32)

Source from the content-addressed store, hash-verified

1367 /// extractCsharpPrimaryCtorParamRefs (5938) — the class/struct/record
1368 /// primary constructor's parameter_list (an unnamed-field child).
1369 fn extract_primary_ctor_param_refs(&mut self, node: Node<'t>, owner_row: u32) {
1370 let param_list = (0..node.named_child_count())
1371 .filter_map(|i| node.named_child(i))
1372 .find(|c| c.kind() == "parameter_list");
1373 let Some(param_list) = param_list else { return };
1374 for i in 0..param_list.named_child_count() {
1375 let Some(p) = param_list.named_child(i) else { continue };
1376 if p.kind() != "parameter" {
1377 continue;
1378 }
1379 if let Some(t) = p.child_by_field_name("type") {
1380 self.walk_type_position(t, owner_row);
1381 }
1382 }
1383 }
1384
1385 /// walkCsharpTypePosition (5955).
1386 fn walk_type_position(&mut self, node: Node<'t>, from_row: u32) {

Callers 2

extract_classMethod · 0.80
extract_structMethod · 0.80

Calls 1

walk_type_positionMethod · 0.80

Tested by

no test coverage detected