Debug Generator

This commit is contained in:
Aoran Zeng
2025-07-16 22:35:09 +08:00
parent e0396164ac
commit 174ba78f0d
2 changed files with 19 additions and 23 deletions

View File

@@ -300,7 +300,7 @@ class Parser {
# 调试方法扁平打印所有sections
method debug-print-sections-flatly() {
say "====== sections ======";
say "====== Sections ======";
for @!sections.kv -> $i, $section {
my $title = $section.title || "(Root)";
my $has-config = $section.configblock.keys ?? "" !! "";
@@ -311,7 +311,7 @@ class Parser {
# 调试方法层级打印sections
method debug-print-sections-hierarchyly() {
say "====== hierarchy ======";
say "====== Hierarchy ======";
my $indent = 0;
@@ -349,7 +349,7 @@ class Parser {
}
# 调试方法:完整的调试信息打印
method debug-print-summary() {
method debug() {
self.debug-print-sections-flatly();
self.debug-print-sections-hierarchyly();
}