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

Function is_transparent_receiver

codegraph-kernel/src/tsjs/extractors.rs:2275–2285  ·  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

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).
2275fn 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!`.

Callers 1

peel_receiverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected