* Returns a string representation of the AppRoot structure for debugging purposes. * This method traverses the AppRoot tree and outputs a formatted string * showing the hierarchy of its child nodes. * * @returns {string} A formatted string representing the AppRoot structure.
()
| 562 | * @returns {string} A formatted string representing the AppRoot structure. |
| 563 | */ |
| 564 | public debug(): string { |
| 565 | let result = "AppRoot\n" |
| 566 | this.root.children.forEach((child, index) => { |
| 567 | const isLast = index === this.root.children.length - 1 |
| 568 | const childName = this.getChildName(child) |
| 569 | const connector = isLast ? "└── " : "├── " |
| 570 | const childPrefix = isLast ? " " : "│ " |
| 571 | |
| 572 | result += `${connector}${childName}:\n` |
| 573 | const visitor = new DebugVisitor(childPrefix, true) |
| 574 | result += child.accept(visitor) |
| 575 | }) |
| 576 | |
| 577 | return result |
| 578 | } |
| 579 | } |
nothing calls this directly
no test coverage detected