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:1238–1252  ·  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

1236 /// extractCsharpPrimaryCtorParamRefs (5938) — the class/struct/record
1237 /// primary constructor's parameter_list (an unnamed-field child).
1238 fn extract_primary_ctor_param_refs(&mut self, node: Node<'t>, owner_row: u32) {
1239 let param_list = (0..node.named_child_count())
1240 .filter_map(|i| node.named_child(i))
1241 .find(|c| c.kind() == "parameter_list");
1242 let Some(param_list) = param_list else { return };
1243 for i in 0..param_list.named_child_count() {
1244 let Some(p) = param_list.named_child(i) else { continue };
1245 if p.kind() != "parameter" {
1246 continue;
1247 }
1248 if let Some(t) = p.child_by_field_name("type") {
1249 self.walk_type_position(t, owner_row);
1250 }
1251 }
1252 }
1253
1254 /// walkCsharpTypePosition (5955).
1255 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