File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Sources/SourceKitBazelBSP/RequestHandlers Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -70,17 +70,20 @@ final class TargetSourcesHandler {
7070 func convertToSourceItems( _ targetSrcs: [ URI ] ) -> [ SourceItem ] {
7171 var result : [ SourceItem ] = [ ]
7272 for src in targetSrcs {
73+ let srcString = src. stringValue
7374 let kind : SourceKitSourceItemKind
74- if src . stringValue . hasSuffix ( " h " ) {
75+ if srcString . hasSuffix ( " h " ) {
7576 kind = . header
7677 } else {
7778 kind = . source
7879 }
79- let language : Language
80- if src . stringValue . hasSuffix ( " swift " ) {
80+ let language : Language ?
81+ if srcString . hasSuffix ( " swift " ) {
8182 language = . swift
82- } else {
83+ } else if srcString . hasSuffix ( " m " ) || kind == . header {
8384 language = . objective_c
85+ } else {
86+ language = nil
8487 }
8588 result. append (
8689 SourceItem (
You can’t perform that action at this time.
0 commit comments