Skip to content

Commit bc8b7a1

Browse files
committed
Print indent and index of control tokens to debug output.
It looks like this was an oversight when I originally added support for these tokens to the pretty printer, and it doesn't show up very often since they're only used with #if config statements.
1 parent 801d068 commit bc8b7a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftFormatPrettyPrint/PrettyPrint.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,8 @@ public class PrettyPrinter {
665665
print(verbatim.print(indent: debugIndent))
666666

667667
case .printerControl(let kind):
668-
print("[PRINTER CONTROL Kind: \(kind)]")
668+
printDebugIndent()
669+
print("[PRINTER CONTROL Kind: \(kind) Idx: \(idx)]")
669670
}
670671
}
671672

0 commit comments

Comments
 (0)