(&mut self, node: Node<'t>)
| 1024 | // --- extractors ------------------------------------------------------------------ |
| 1025 | |
| 1026 | fn extract_function(&mut self, node: Node<'t>) { |
| 1027 | stack_guard!(); |
| 1028 | // getReceiverType short-circuit (1522) — extension fns at any scope. |
| 1029 | if self.receiver_type_of(node).is_some() { |
| 1030 | self.extract_method(node); |
| 1031 | return; |
| 1032 | } |
| 1033 | let name = self.extract_name(node); |
| 1034 | if name == "<anonymous>" { |
| 1035 | if let Some(body) = self.resolve_body(node) { |
| 1036 | self.visit_function_body(body); |
| 1037 | } |
| 1038 | return; |
| 1039 | } |
| 1040 | let extra = Extra { |
| 1041 | docstring: preceding_docstring(node, self.src), |
| 1042 | signature: self.signature_of(node), |
| 1043 | visibility: Some(self.visibility_of(node)), |
| 1044 | is_async: Some(self.is_async(node)), |
| 1045 | is_static: Some(false), // kotlin isStatic is always false |
| 1046 | return_type: self.return_type_of(node), |
| 1047 | ..Extra::default() |
| 1048 | }; |
| 1049 | let Some(row) = self.create_node("function", &name, node, extra) else { return }; |
| 1050 | // extractTypeAnnotations: the generic path's field lookups all miss |
| 1051 | // (zero fields) — kotlin emits ZERO type-annotation refs. |
| 1052 | self.extract_decorators_for(node, row); |
| 1053 | self.stack.push(Scope { row, kind: "function", name }); |
| 1054 | if let Some(body) = self.resolve_body(node) { |
| 1055 | self.visit_function_body(body); |
| 1056 | } |
| 1057 | self.stack.pop(); |
| 1058 | } |
| 1059 | |
| 1060 | fn extract_method(&mut self, node: Node<'t>) { |
| 1061 | stack_guard!(); |
no test coverage detected