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