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 b11ad16 commit 1361372Copy full SHA for 1361372
Sources/SourceKitLSP/Swift/SemanticTokens.swift
@@ -64,10 +64,12 @@ extension SwiftLanguageService {
64
let tokens =
65
await tree
66
.classifications(in: range)
67
- .flatMap({ $0.highlightingTokens(in: snapshot) })
+ .map { $0.highlightingTokens(in: snapshot) }
68
+ .reduce(into: SyntaxHighlightingTokens(tokens: [])) { $0.tokens += $1.tokens }
69
+
70
- return SyntaxHighlightingTokens(tokens: tokens.tokens)
- .mergingTokens(with: semanticTokens ?? [])
71
+ return tokens
72
+ .mergingTokens(with: semanticTokens ?? SyntaxHighlightingTokens(tokens: []))
73
.sorted { $0.start < $1.start }
74
}
75
0 commit comments