* Counts the total number of symbols including nested children
(symbols: DocumentSymbol[])
| 516 | * Counts the total number of symbols including nested children |
| 517 | */ |
| 518 | function countSymbols(symbols: DocumentSymbol[]): number { |
| 519 | let count = symbols.length |
| 520 | for (const symbol of symbols) { |
| 521 | if (symbol.children && symbol.children.length > 0) { |
| 522 | count += countSymbols(symbol.children) |
| 523 | } |
| 524 | } |
| 525 | return count |
| 526 | } |
| 527 | |
| 528 | /** |
| 529 | * Counts unique files from an array of locations |