diff --git a/Package.resolved b/Package.resolved index 975f61e..b4725da 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-macro-testing", "state" : { - "revision" : "5c4a1b9d7c23cd5c08ea50677d8e89080365cb00", - "version" : "0.4.0" + "revision" : "20c1a8f3b624fb5d1503eadcaa84743050c350f4", + "version" : "0.5.2" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-snapshot-testing", "state" : { - "revision" : "625ccca8570773dd84a34ee51a81aa2bc5a4f97a", - "version" : "1.16.0" + "revision" : "7b0bbbae90c41f848f90ac7b4df6c4f50068256d", + "version" : "1.17.5" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/swiftlang/swift-syntax.git", "state" : { - "revision" : "303e5c5c36d6a558407d364878df131c3546fad8", - "version" : "510.0.2" + "revision" : "0687f71944021d616d34d922343dcef086855920", + "version" : "600.0.1" } }, { diff --git a/Package.swift b/Package.swift index 959f48c..215e91a 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/swiftlang/swift-syntax.git", - from: "510.0.0" + from: "600.0.0" ), .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.3.0"), .package(url: "https://github.com/SwiftPackageIndex/SPIManifest.git", from: "0.12.0"), diff --git a/Sources/MacroToolkit/Function.swift b/Sources/MacroToolkit/Function.swift index 96e6720..9c0e0af 100644 --- a/Sources/MacroToolkit/Function.swift +++ b/Sources/MacroToolkit/Function.swift @@ -32,7 +32,7 @@ public struct Function { } public var isThrowing: Bool { - _syntax.signature.effectSpecifiers?.throwsSpecifier != nil + _syntax.signature.effectSpecifiers?.throwsClause?.throwsSpecifier != nil } public var parameters: [FunctionParameter] { diff --git a/Sources/MacroToolkit/SwiftSyntax+Extensions.swift b/Sources/MacroToolkit/SwiftSyntax+Extensions.swift index 2b0a744..f087322 100644 --- a/Sources/MacroToolkit/SwiftSyntax+Extensions.swift +++ b/Sources/MacroToolkit/SwiftSyntax+Extensions.swift @@ -67,7 +67,7 @@ extension FunctionDeclSyntax { public var effectSpecifiersOrDefault: FunctionEffectSpecifiersSyntax { signature.effectSpecifiers ?? FunctionEffectSpecifiersSyntax( - leadingTrivia: " ", asyncSpecifier: nil, throwsSpecifier: nil + leadingTrivia: " ", asyncSpecifier: nil, throwsClause: nil ) } @@ -92,7 +92,7 @@ extension FunctionDeclSyntax { .with( \.effectSpecifiers, effectSpecifiersOrDefault - .with(\.throwsSpecifier, isPresent ? " throws" : nil) + .with(\.throwsClause, isPresent ? ThrowsClauseSyntax(throwsSpecifier: " throws") : nil) ) ) } diff --git a/Tests/MacroToolkitTests/MacroToolkitTests.swift b/Tests/MacroToolkitTests/MacroToolkitTests.swift index 901878d..a8f7238 100644 --- a/Tests/MacroToolkitTests/MacroToolkitTests.swift +++ b/Tests/MacroToolkitTests/MacroToolkitTests.swift @@ -222,16 +222,16 @@ final class MacroToolkitTests: XCTestCase { } static let nextDay: Self = - Self (rawValue: 1 << Options.nextDay.rawValue) + Self(rawValue: 1 << Options.nextDay.rawValue) static let secondDay: Self = - Self (rawValue: 1 << Options.secondDay.rawValue) + Self(rawValue: 1 << Options.secondDay.rawValue) static let priority: Self = - Self (rawValue: 1 << Options.priority.rawValue) + Self(rawValue: 1 << Options.priority.rawValue) static let standard: Self = - Self (rawValue: 1 << Options.standard.rawValue) + Self(rawValue: 1 << Options.standard.rawValue) } extension ShippingOptions: OptionSet {