(node: any)
| 104 | } |
| 105 | |
| 106 | function getEnclosingNamedSymbol(node: any): string | null { |
| 107 | let cur = node.parent; |
| 108 | while (cur) { |
| 109 | const kind = typeToKind.get(cur.type); |
| 110 | if (kind) { |
| 111 | const name = getName(cur); |
| 112 | if (name) return name; |
| 113 | } |
| 114 | cur = cur.parent; |
| 115 | } |
| 116 | return null; |
| 117 | } |
| 118 | |
| 119 | function visit(node: any) { |
| 120 | let kind = typeToKind.get(node.type); |