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

Function rubyEnclosingCall

src/extraction/function-ref.ts:890–896  ·  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

888
889/** The Ruby `call` node whose argument_list (or keyword pair) contains `node`. */
890function rubyEnclosingCall(node: SyntaxNode): SyntaxNode | null {
891 let cur: SyntaxNode | null = node.parent;
892 for (let hops = 0; cur && hops < 4; hops++, cur = cur.parent) {
893 if (cur.type === 'call') return cur;
894 }
895 return null;
896}
897
898// ---------------------------------------------------------------------------
899// Go: a local that shadows the function a value names (#2596)

Callers 1

normalizeSpecialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected