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