File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
SourceryFramework/Sources/Parsing/SwiftSyntax/AST Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -261,9 +261,14 @@ var dependencies: [Package.Dependency] = [
261
261
. package ( url: " https://github.com/swiftlang/swift-syntax.git " , from: " 600.0.0 " ) ,
262
262
. package ( url: " https://github.com/Quick/Quick.git " , from: " 3.0.0 " ) ,
263
263
. package ( url: " https://github.com/Quick/Nimble.git " , from: " 9.0.0 " ) ,
264
- . package ( url: " https://github.com/art-divin/swift-package-manager.git " , exact: " 1.0.8 " ) ,
265
264
]
266
265
266
+ #if compiler(>=6.2)
267
+ dependencies. append ( . package ( url: " https://github.com/swiftlang/swift-package-manager.git " , revision: " 5c57a39 " ) )
268
+ #else
269
+ dependencies. append ( . package ( url: " https://github.com/art-divin/swift-package-manager.git " , exact: " 1.0.8 " ) )
270
+ #endif
271
+
267
272
#if !canImport(ObjectiveC)
268
273
dependencies. append ( . package ( url: " https://github.com/apple/swift-crypto.git " , from: " 3.0.0 " ) )
269
274
#endif
Original file line number Diff line number Diff line change @@ -4,9 +4,21 @@ import SwiftSyntax
4
4
5
5
extension GenericType {
6
6
convenience init ( name: String , node: GenericArgumentClauseSyntax ) {
7
+ #if compiler(>=6.2)
8
+ // TODO: ExprSyntax may need to be handled
9
+ let parameters = node. arguments. map { argument -> GenericTypeParameter ? in
10
+ switch argument. argument {
11
+ case . type( let type) :
12
+ return GenericTypeParameter ( typeName: TypeName ( type) )
13
+ default : // case .expr
14
+ return nil
15
+ }
16
+ } . compactMap ( { $0 } )
17
+ #else
7
18
let parameters = node. arguments. map { argument in
8
19
GenericTypeParameter ( typeName: TypeName ( argument. argument) )
9
20
}
21
+ #endif
10
22
11
23
self . init ( name: name, typeParameters: parameters)
12
24
}
You can’t perform that action at this time.
0 commit comments