(n: Node<'t>)
| 1179 | |
| 1180 | fn function_returned_object(&self, fn_node: Node<'t>) -> Option<Node<'t>> { |
| 1181 | fn as_object<'t>(n: Node<'t>) -> Option<Node<'t>> { |
| 1182 | stack_guard!(); |
| 1183 | match n.kind() { |
| 1184 | "object" | "object_expression" => Some(n), |
| 1185 | "parenthesized_expression" => { |
| 1186 | for i in 0..n.named_child_count() { |
| 1187 | if let Some(inner) = n.named_child(i).and_then(as_object) { |
| 1188 | return Some(inner); |
| 1189 | } |
| 1190 | } |
| 1191 | None |
| 1192 | } |
| 1193 | _ => None, |
| 1194 | } |
| 1195 | } |
| 1196 | let body = fn_node.child_by_field_name("body")?; |
| 1197 | if let Some(direct) = as_object(body) { |
| 1198 | return Some(direct); |
nothing calls this directly
no outgoing calls
no test coverage detected