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)
| 2652 | /// TS/JS wrappers that keep a member call's receiver the same object |
| 2653 | /// (mirrors TS_JS_TRANSPARENT_RECEIVER_TYPES in tree-sitter.ts). |
| 2654 | fn is_transparent_receiver(kind: &str) -> bool { |
| 2655 | matches!( |
| 2656 | kind, |
| 2657 | "parenthesized_expression" |
| 2658 | | "non_null_expression" |
| 2659 | | "as_expression" |
| 2660 | | "satisfies_expression" |
| 2661 | | "type_assertion" |
| 2662 | | "await_expression" |
| 2663 | ) |
| 2664 | } |
| 2665 | |
| 2666 | /// Strip transparent wrappers off a receiver (mirrors peelTsJsReceiver), |
| 2667 | /// including the grammar's `(a && b)!` parse of `a && b!`. |