isSwiftCallWrapper (tree-sitter.ts): a wrapper that leaves a call's target the same — `try`/`await`, which before a chain bind to the part before its last call (`try! A().b()` is `(try! A()).b()`), or a prefix operator, which binds to the leftmost operand (`!isReady()` is `(!isReady)()`). An implicit member's leading `.` (`.success(x)`) is part of the name.
(node: Node, src: &str)
| 134 | /// binds to the leftmost operand (`!isReady()` is `(!isReady)()`). An implicit |
| 135 | /// member's leading `.` (`.success(x)`) is part of the name. |
| 136 | fn is_call_wrapper(node: Node, src: &str) -> bool { |
| 137 | match node.kind() { |
| 138 | "try_expression" | "await_expression" => true, |
| 139 | "prefix_expression" => !src[node.byte_range()].starts_with('.'), |
| 140 | _ => false, |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | /// swiftWrappedOperand: the operand a call wrapper wraps. |
| 145 | fn wrapped_operand<'t>(node: Node<'t>) -> Option<Node<'t>> { |
no outgoing calls
no test coverage detected