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

Method callee_name

codegraph-kernel/src/rlang.rs:251–258  ·  view source on GitHub ↗

calleeName (r.ts:46-55): bare identifier text, or a namespace_operator's `rhs` field text (`pkg::fn` → `fn`) — so `methods::setClass` etc. trigger the special branches. Everything else (extract_operator, subset2, string, call, return…) → None.

(&self, call: Node<'t>)

Source from the content-addressed store, hash-verified

249 /// `methods::setClass` etc. trigger the special branches. Everything else
250 /// (extract_operator, subset2, string, call, return…) → None.
251 fn callee_name(&self, call: Node<'t>) -> Option<&'t str> {
252 let f = call.child_by_field_name("function")?;
253 match f.kind() {
254 "identifier" => Some(self.text(f)),
255 "namespace_operator" => f.child_by_field_name("rhs").map(|rhs| self.text(rhs)),
256 _ => None,
257 }
258 }
259
260 /// firstArgValue (r.ts:58-67): the FIRST `argument`-typed named child of
261 /// the `arguments` field → its `value` field (named arguments are NOT

Callers 3

hook_callMethod · 0.80
hook_binary_operatorMethod · 0.80
extract_class_membersMethod · 0.80

Calls 1

textMethod · 0.45

Tested by

no test coverage detected