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 88fadc7 commit dcdda8cCopy full SHA for dcdda8c
Sources/SwiftParserDiagnostics/MissingNodesError.swift
@@ -36,11 +36,7 @@ fileprivate enum NodesDescriptionPart {
36
switch self {
37
case .tokensWithDefaultText(var tokens):
38
if format {
39
- tokens = tokens.enumerated()
40
- .map { index, token in
41
- // We detach the nodes from the second one onwards, considering the line indentation only for the first node
42
- NoNewlinesFormat(viewMode: .all).visit(index == 0 ? token : token.detached)
43
- }
+ tokens = tokens.map { NoNewlinesFormat(viewMode: .all).visit($0.detached) }
44
}
45
if !tokens.isEmpty {
46
tokens[0] = tokens[0].with(\.leadingTrivia, [])
0 commit comments