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:1228–1242  ·  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

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