@@ -391,28 +391,7 @@ extension SymbolGraph.Symbol {
391
391
/// - Parameter identifier: The identifier string to check.
392
392
/// - Returns: The matching `KindIdentifier` case, or `nil` if there was no match.
393
393
private static func lookupIdentifier( identifier: String ) -> KindIdentifier ? {
394
- switch identifier {
395
- case " associatedtype " : return . associatedtype
396
- case " class " : return . class
397
- case " deinit " : return . deinit
398
- case " enum " : return . enum
399
- case " enum.case " : return . case
400
- case " func " : return . func
401
- case " func.op " : return . operator
402
- case " init " : return . `init`
403
- case " method " : return . method
404
- case " property " : return . property
405
- case " protocol " : return . protocol
406
- case " struct " : return . struct
407
- case " subscript " : return . subscript
408
- case " type.method " : return . typeMethod
409
- case " type.property " : return . typeProperty
410
- case " type.subscript " : return . typeSubscript
411
- case " typealias " : return . typealias
412
- case " var " : return . var
413
- case " module " : return . module
414
- default : return nil
415
- }
394
+ allCases. first ( where: { $0. identifier == identifier } )
416
395
}
417
396
418
397
/// Strips the first component of the given identifier string, so that (for example) `"swift.func"` will return `"func"`.
0 commit comments