The Ruby `call` node whose argument_list (or keyword pair) contains `node`.
(node: SyntaxNode)
| 867 | |
| 868 | /** The Ruby `call` node whose argument_list (or keyword pair) contains `node`. */ |
| 869 | function rubyEnclosingCall(node: SyntaxNode): SyntaxNode | null { |
| 870 | let cur: SyntaxNode | null = node.parent; |
| 871 | for (let hops = 0; cur && hops < 4; hops++, cur = cur.parent) { |
| 872 | if (cur.type === 'call') return cur; |
| 873 | } |
| 874 | return null; |
| 875 | } |
| 876 | |
| 877 | // --------------------------------------------------------------------------- |
| 878 | // Go: a local that shadows the function a value names (#2596) |