MCPcopy
hub / github.com/colbymchenry/codegraph / rubyEnclosingCall

Function rubyEnclosingCall

src/extraction/function-ref.ts:837–843  ·  view source on GitHub ↗

The Ruby `call` node whose argument_list (or keyword pair) contains `node`.

(node: SyntaxNode)

Source from the content-addressed store, hash-verified

835
836/** The Ruby `call` node whose argument_list (or keyword pair) contains `node`. */
837function rubyEnclosingCall(node: SyntaxNode): SyntaxNode | null {
838 let cur: SyntaxNode | null = node.parent;
839 for (let hops = 0; cur && hops < 4; hops++, cur = cur.parent) {
840 if (cur.type === 'call') return cur;
841 }
842 return null;
843}

Callers 1

normalizeSpecialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected