isSwiftCallWrapper (tree-sitter.ts): a wrapper that leaves a call's target the same — `try`/`await`/`unsafe`, 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)
| 135 | /// `(!isReady)()`). An implicit member's leading `.` (`.success(x)`) is part |
| 136 | /// of the name. |
| 137 | fn is_call_wrapper(node: Node, src: &str) -> bool { |
| 138 | match node.kind() { |
| 139 | "try_expression" | "await_expression" | "unsafe_expression" => true, |
| 140 | "prefix_expression" => !src[node.byte_range()].starts_with('.'), |
| 141 | _ => false, |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | /// swiftWrappedOperand: the operand a call wrapper wraps. |
| 146 | fn wrapped_operand<'t>(node: Node<'t>) -> Option<Node<'t>> { |
no outgoing calls
no test coverage detected