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.
1 parent 168cc2d commit 88eb8ebCopy full SHA for 88eb8eb
Sources/swift-parser-cli/swift-parser-cli.swift
@@ -134,15 +134,19 @@ class VerifyRoundTrip: ParsableCommand {
134
) throws {
135
let tree = Parser.parse(source: source)
136
137
- _ = ParseDiagnosticsGenerator.diagnostics(for: tree)
+ var diags = ParseDiagnosticsGenerator.diagnostics(for: tree)
138
139
let resultTree: Syntax
140
if foldSequences {
141
- resultTree = foldAllSequences(tree).0
+ let folded = foldAllSequences(tree)
142
+ resultTree = folded.0
143
+ diags += folded.1
144
} else {
145
resultTree = Syntax(tree)
146
}
147
148
+ _ = DiagnosticsFormatter.annotatedSource(tree: tree, diags: diags)
149
+
150
if resultTree.syntaxTextBytes != [UInt8](source) {
151
throw Error.roundTripFailed
152
0 commit comments