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

Function is_transparent_receiver

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

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

Callers 1

peel_receiverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected