extractFunction — only reachable for a method outside any class (unreachable on non-erroring C#; kept faithful to the generic tail).
(&mut self, node: Node<'t>)
| 924 | /// extractFunction — only reachable for a method outside any class |
| 925 | /// (unreachable on non-erroring C#; kept faithful to the generic tail). |
| 926 | fn extract_function(&mut self, node: Node<'t>) { |
| 927 | let name = self.extract_name(node); |
| 928 | if name == "<anonymous>" { |
| 929 | if let Some(body) = node.child_by_field_name("body") { |
| 930 | self.visit_function_body(body); |
| 931 | } |
| 932 | return; |
| 933 | } |
| 934 | let extra = Extra { |
| 935 | docstring: preceding_docstring(node, self.src), |
| 936 | signature: None, |
| 937 | visibility: Some(self.visibility_of(node)), |
| 938 | is_async: Some(self.is_async(node)), |
| 939 | is_static: Some(self.is_static(node)), |
| 940 | return_type: self.return_type_of(node), |
| 941 | }; |
| 942 | let Some(row) = self.create_node("function", &name, node, extra) else { return }; |
| 943 | self.extract_csharp_type_refs(node, row); |
| 944 | self.stack.push(Scope { row, kind: "function", name }); |
| 945 | if let Some(body) = node.child_by_field_name("body") { |
| 946 | self.visit_function_body(body); |
| 947 | } |
| 948 | self.stack.pop(); |
| 949 | } |
| 950 | |
| 951 | fn extract_variable(&mut self, node: Node<'t>) { |
| 952 | // extractVariable's generic fallback: direct identifier / |
no test coverage detected