(n: Node<'t>)
| 1219 | |
| 1220 | fn function_returned_object(&self, fn_node: Node<'t>) -> Option<Node<'t>> { |
| 1221 | fn as_object<'t>(n: Node<'t>) -> Option<Node<'t>> { |
| 1222 | stack_guard!(); |
| 1223 | match n.kind() { |
| 1224 | "object" | "object_expression" => Some(n), |
| 1225 | "parenthesized_expression" => { |
| 1226 | for i in 0..n.named_child_count() { |
| 1227 | if let Some(inner) = n.named_child(i).and_then(as_object) { |
| 1228 | return Some(inner); |
| 1229 | } |
| 1230 | } |
| 1231 | None |
| 1232 | } |
| 1233 | _ => None, |
| 1234 | } |
| 1235 | } |
| 1236 | let body = fn_node.child_by_field_name("body")?; |
| 1237 | if let Some(direct) = as_object(body) { |
| 1238 | return Some(direct); |
nothing calls this directly
no outgoing calls
no test coverage detected