(n: Node<'t>)
| 1076 | |
| 1077 | fn function_returned_object(&self, fn_node: Node<'t>) -> Option<Node<'t>> { |
| 1078 | fn as_object<'t>(n: Node<'t>) -> Option<Node<'t>> { |
| 1079 | stack_guard!(); |
| 1080 | match n.kind() { |
| 1081 | "object" | "object_expression" => Some(n), |
| 1082 | "parenthesized_expression" => { |
| 1083 | for i in 0..n.named_child_count() { |
| 1084 | if let Some(inner) = n.named_child(i).and_then(as_object) { |
| 1085 | return Some(inner); |
| 1086 | } |
| 1087 | } |
| 1088 | None |
| 1089 | } |
| 1090 | _ => None, |
| 1091 | } |
| 1092 | } |
| 1093 | let body = fn_node.child_by_field_name("body")?; |
| 1094 | if let Some(direct) = as_object(body) { |
| 1095 | return Some(direct); |
nothing calls this directly
no outgoing calls
no test coverage detected