TS/JS wrappers that keep a member call's receiver the same object (mirrors TS_JS_TRANSPARENT_RECEIVER_TYPES in tree-sitter.ts).
(kind: &str)
| 2273 | /// TS/JS wrappers that keep a member call's receiver the same object |
| 2274 | /// (mirrors TS_JS_TRANSPARENT_RECEIVER_TYPES in tree-sitter.ts). |
| 2275 | fn is_transparent_receiver(kind: &str) -> bool { |
| 2276 | matches!( |
| 2277 | kind, |
| 2278 | "parenthesized_expression" |
| 2279 | | "non_null_expression" |
| 2280 | | "as_expression" |
| 2281 | | "satisfies_expression" |
| 2282 | | "type_assertion" |
| 2283 | | "await_expression" |
| 2284 | ) |
| 2285 | } |
| 2286 | |
| 2287 | /// Strip transparent wrappers off a receiver (mirrors peelTsJsReceiver), |
| 2288 | /// including the grammar's `(a && b)!` parse of `a && b!`. |