MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_transparent_receiver

Function is_transparent_receiver

codegraph-kernel/src/tsjs/extractors.rs:2267–2277  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

peel_receiverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected