@@ -68,28 +68,7 @@ extension SymbolGraph.Symbol {
68
68
/// - Parameter identifier: The identifier string to check.
69
69
/// - Returns: The matching `KindIdentifier` case, or `nil` if there was no match.
70
70
private static func lookupIdentifier( identifier: String ) -> KindIdentifier ? {
71
- switch identifier {
72
- case " associatedtype " : return . associatedtype
73
- case " class " : return . class
74
- case " deinit " : return . deinit
75
- case " enum " : return . enum
76
- case " enum.case " : return . case
77
- case " func " : return . func
78
- case " func.op " : return . operator
79
- case " init " : return . `init`
80
- case " method " : return . method
81
- case " property " : return . property
82
- case " protocol " : return . protocol
83
- case " struct " : return . struct
84
- case " subscript " : return . subscript
85
- case " type.method " : return . typeMethod
86
- case " type.property " : return . typeProperty
87
- case " type.subscript " : return . typeSubscript
88
- case " typealias " : return . typealias
89
- case " var " : return . var
90
- case " module " : return . module
91
- default : return nil
92
- }
71
+ allCases. first ( where: { $0. identifier == identifier } )
93
72
}
94
73
95
74
/// Compares the given identifier against the known default symbol kinds, and returns whether it matches one.
0 commit comments