(node: any)
| 102 | } |
| 103 | |
| 104 | function visit(node: any) { |
| 105 | if (nodeTypes.includes(node.type)) { |
| 106 | const symName = getSymbolName(node); |
| 107 | if (symName === name) { |
| 108 | const enclosing = getEnclosingClassName(node); |
| 109 | if (!parentClassName || enclosing === parentClassName) { |
| 110 | matches.push({ |
| 111 | name, |
| 112 | kind: node.type, |
| 113 | startIndex: node.startIndex, |
| 114 | endIndex: node.endIndex, |
| 115 | startRow: node.startPosition.row, |
| 116 | endRow: node.endPosition.row, |
| 117 | startColumn: node.startPosition.column, |
| 118 | endColumn: node.endPosition.column, |
| 119 | }); |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | for (let i = 0; i < node.childCount; i++) { |
| 124 | const c = node.child(i); |
| 125 | if (c) visit(c); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | visit(rootNode); |
| 130 | return matches; |
no test coverage detected