(node: any)
| 85 | } |
| 86 | |
| 87 | function getEnclosingClassName(node: any): string | null { |
| 88 | let cur = node.parent; |
| 89 | while (cur) { |
| 90 | if ( |
| 91 | cur.type === 'class_declaration' || |
| 92 | cur.type === 'abstract_class_declaration' || |
| 93 | cur.type === 'class_definition' || |
| 94 | cur.type === 'struct_item' || |
| 95 | cur.type === 'class' // generic |
| 96 | ) { |
| 97 | return getSymbolName(cur); |
| 98 | } |
| 99 | cur = cur.parent; |
| 100 | } |
| 101 | return null; |
| 102 | } |
| 103 | |
| 104 | function visit(node: any) { |
| 105 | if (nodeTypes.includes(node.type)) { |
no test coverage detected