We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1ba598a + 61b61cb commit 0a67557Copy full SHA for 0a67557
Sources/swift-parser-cli/swift-parser-cli.swift
@@ -182,6 +182,9 @@ class PrintTree: ParsableCommand {
182
@Flag(name: .long, help: "Perform sequence folding with the standard operators")
183
var foldSequences: Bool = false
184
185
+ @Flag(name: .long, help: "Include trivia in the output")
186
+ var includeTrivia: Bool = false
187
+
188
func run() throws {
189
let source = try getContentsOfSourceFile(at: sourceFile)
190
@@ -195,7 +198,7 @@ class PrintTree: ParsableCommand {
195
198
resultTree = Syntax(tree)
196
199
}
197
200
- print(resultTree.recursiveDescription)
201
+ print(resultTree.debugDescription(includeChildren: true, includeTrivia: includeTrivia))
202
203
204
0 commit comments