Skip to content

Commit e9d0459

Browse files
committed
style: Fix some SwiftLint issue
Signed-off-by: Qian Qian "Cubik"‎ <[email protected]>
1 parent ccc8d64 commit e9d0459

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Sources/CodeEditLanguages/CodeLanguage.swift

+17-17
Original file line numberDiff line numberDiff line change
@@ -34,56 +34,56 @@ public struct CodeLanguage {
3434
self.additionalHighlights = highlights
3535
self.additionalIdentifiers = additionalIdentifiers
3636
}
37-
37+
3838
/// The ID of the language
3939
public let id: TreeSitterLanguage
40-
40+
4141
/// The display name of the language
4242
public let tsName: String
43-
43+
4444
/// A set of file extensions for the language
4545
///
4646
/// In special cases this can also be a file name
4747
/// (e.g `Dockerfile`, `Makefile`)
4848
public let extensions: Set<String>
49-
49+
5050
/// The leading string of a comment line
5151
public let lineCommentString: String
52-
52+
5353
/// The leading and trailing string of a multi-line comment
5454
public let rangeCommentStrings: (String, String)
55-
55+
5656
/// The leading (and trailing, if there is one) string of a documentation comment
5757
public let documentationCommentStrings: Set<DocumentationComments>
58-
58+
5959
/// The query URL of a language this language inherits from. (e.g.: C for C++)
6060
public let parentQueryURL: URL?
61-
61+
6262
/// Additional highlight file names (e.g.: JSX for JavaScript)
6363
public let additionalHighlights: Set<String>?
64-
64+
6565
/// The query URL for the language if available
6666
public var queryURL: URL? {
6767
queryURL()
6868
}
69-
69+
7070
/// The bundle's resource URL
7171
internal var resourceURL: URL? = Bundle.module.resourceURL
72-
72+
7373
/// A set of aditional identifiers to use for things like shebang matching.
7474
public let additionalIdentifiers: Set<String>
75-
75+
7676
/// The tree-sitter language for the language if available
7777
public var language: Language? {
7878
guard let tsLanguage = tsLanguage else { return nil }
7979
return Language(language: tsLanguage)
8080
}
81-
81+
8282
internal func queryURL(for highlights: String = "highlights") -> URL? {
8383
return resourceURL?
8484
.appendingPathComponent("Resources/tree-sitter-\(tsName)/\(highlights).scm")
8585
}
86-
86+
8787
/// Gets the TSLanguage from `tree-sitter`
8888
private var tsLanguage: UnsafeMutablePointer<TSLanguage>? {
8989
switch id {
@@ -179,7 +179,7 @@ extension CodeLanguage: Hashable {
179179
public static func == (lhs: CodeLanguage, rhs: CodeLanguage) -> Bool {
180180
return lhs.id == rhs.id
181181
}
182-
182+
183183
public func hash(into hasher: inout Hasher) {
184184
hasher.combine(id)
185185
}
@@ -204,7 +204,7 @@ public enum DocumentationComments: Hashable {
204204
}
205205
}
206206
}
207-
207+
208208
public func hash(into hasher: inout Hasher) {
209209
switch self {
210210
case .single(let string):
@@ -214,7 +214,7 @@ public enum DocumentationComments: Hashable {
214214
hasher.combine(pair.1)
215215
}
216216
}
217-
217+
218218
case single(String)
219219
case pair((String, String))
220220
}

0 commit comments

Comments
 (0)