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)
| 2135 | /// TS/JS wrappers that keep a member call's receiver the same object |
| 2136 | /// (mirrors TS_JS_TRANSPARENT_RECEIVER_TYPES in tree-sitter.ts). |
| 2137 | fn is_transparent_receiver(kind: &str) -> bool { |
| 2138 | matches!( |
| 2139 | kind, |
| 2140 | "parenthesized_expression" |
| 2141 | | "non_null_expression" |
| 2142 | | "as_expression" |
| 2143 | | "satisfies_expression" |
| 2144 | | "type_assertion" |
| 2145 | | "await_expression" |
| 2146 | ) |
| 2147 | } |
| 2148 | |
| 2149 | /// Strip transparent wrappers off a receiver (mirrors peelTsJsReceiver), |
| 2150 | /// including the grammar's `(a && b)!` parse of `a && b!`. |