(node: any)
| 92 | } |
| 93 | |
| 94 | function getName(node: any): string | null { |
| 95 | const nameNode = node.childForFieldName('name'); |
| 96 | if (nameNode) return nameNode.text; |
| 97 | for (let i = 0; i < node.childCount; i++) { |
| 98 | const c = node.child(i); |
| 99 | if (c && (c.type === 'identifier' || c.type === 'property_identifier' || c.type === 'type_identifier')) { |
| 100 | return c.text; |
| 101 | } |
| 102 | } |
| 103 | return null; |
| 104 | } |
| 105 | |
| 106 | function getEnclosingNamedSymbol(node: any): string | null { |
| 107 | let cur = node.parent; |
no test coverage detected