Skip to content

Commit b41b87b

Browse files
committed
Check that diagnostics generation works when running verify-round-trip
This allows us to reduce cases in which the parser is crashing during diagnostic generation.
1 parent 6e3dfb3 commit b41b87b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/swift-parser-cli/swift-parser-cli.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ class VerifyRoundTrip: ParsableCommand {
133133
) throws {
134134
let tree = Parser.parse(source: source)
135135

136+
_ = ParseDiagnosticsGenerator.diagnostics(for: tree)
137+
136138
let resultTree: Syntax
137139
if foldSequences {
138140
resultTree = foldAllSequences(tree).0

0 commit comments

Comments
 (0)