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