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

Method callee_name

codegraph-kernel/src/rlang.rs:252–259  ·  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

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

Callers 3

hook_callMethod · 0.45
hook_binary_operatorMethod · 0.45
extract_class_membersMethod · 0.45

Calls 2

mapMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected