extractCsharpPrimaryCtorParamRefs (5938) — the class/struct/record primary constructor's parameter_list (an unnamed-field child).
(&mut self, node: Node<'t>, owner_row: u32)
| 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) { |
no test coverage detected