Skip to content

Commit 75ebf13

Browse files
committed
[CHORE] Updating to swift-syntax 601.0.1
1 parent ec5dd1b commit 75ebf13

File tree

7 files changed

+72
-10
lines changed

7 files changed

+72
-10
lines changed

Package.resolved

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 6.1
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
@@ -20,7 +20,7 @@ let package = Package(
2020
),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
23+
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "601.0.1"),
2424
],
2525
targets: [
2626
.target(

[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
23+
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "601.0.1"),
2424
],
2525
targets: [
2626
.target(

[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
23+
2424
],
2525
targets: [
2626
.target(

[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
23+
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "601.0.1"),
2424
],
2525
targets: [
2626
.target(

[email protected]

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// swift-tools-version: 6.0
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "SyntaxSparrow",
8+
platforms: [
9+
.macOS(.v10_15),
10+
.iOS(.v13),
11+
.tvOS(.v13),
12+
.watchOS(.v6),
13+
.macCatalyst(.v13)
14+
],
15+
products: [
16+
// Products define the executables and libraries a package produces, and make them visible to other packages.
17+
.library(
18+
name: "SyntaxSparrow",
19+
targets: ["SyntaxSparrow"]
20+
),
21+
],
22+
dependencies: [
23+
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "601.0.1"),
24+
],
25+
targets: [
26+
.target(
27+
name: "SyntaxSparrow",
28+
dependencies: [
29+
.product(name: "SwiftSyntax", package: "swift-syntax"),
30+
.product(name: "SwiftParser", package: "swift-syntax"),
31+
],
32+
resources: [
33+
.copy("Resources/PrivacyInfo.xcprivacy")
34+
],
35+
swiftSettings: [
36+
.swiftLanguageMode(.v6)
37+
]
38+
),
39+
.testTarget(
40+
name: "SyntaxSparrowTests",
41+
dependencies: [
42+
"SyntaxSparrow",
43+
]
44+
),
45+
]
46+
)
47+
48+
// Supplementary
49+
package.dependencies.append(contentsOf: [
50+
.package(url: "https://github.com/SwiftPackageIndex/SPIManifest.git", from: "0.12.0"),
51+
])

Sources/SyntaxSparrow/Public/Semantics/Components/EntityType.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,14 @@ public enum EntityType: Equatable, Hashable, CustomStringConvertible {
139139
public init(_ typeSyntax: TypeSyntax) {
140140
self = EntityType.parseType(typeSyntax)
141141
}
142+
143+
/// Creates a new ``SyntaxSparrow/EntityType`` instance from a `GenericArgumentSyntax.Argument` node.
144+
public init(_ argument: GenericArgumentSyntax.Argument) {
145+
switch argument {
146+
case .type(let typeSyntax):
147+
self = EntityType.parseType(typeSyntax)
148+
default:
149+
self = .empty
150+
}
151+
}
142152
}

0 commit comments

Comments
 (0)