Skip to content

Commit

Permalink
Update to swift-syntax 600.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stackotter committed Nov 25, 2024
1 parent fe6653d commit e706aa9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-docc-plugin",
"state" : {
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
"version" : "1.3.0"
"revision" : "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64",
"version" : "1.4.3"
}
},
{
Expand All @@ -41,8 +41,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "7b0bbbae90c41f848f90ac7b4df6c4f50068256d",
"version" : "1.17.5"
"revision" : "42a086182681cf661f5c47c9b7dc3931de18c6d7",
"version" : "1.17.6"
}
},
{
Expand All @@ -59,8 +59,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/Yams.git",
"state" : {
"revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3",
"version" : "5.0.6"
"revision" : "3036ba9d69cf1fd04d433527bc339dc0dc75433d",
"version" : "5.1.3"
}
}
],
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/swiftlang/swift-syntax.git",
from: "600.0.0"
from: "600.0.1"
),
.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"),
Expand Down Expand Up @@ -52,7 +52,7 @@ let package = Package(
"MacroToolkit",
.product(name: "MacroTesting", package: "swift-macro-testing"),
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxMacros", package: "swift-syntax")
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
]
),
]
Expand Down
2 changes: 1 addition & 1 deletion Sources/MacroToolkit/Function.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public struct Function {
}

public var isThrowing: Bool {
_syntax.signature.effectSpecifiers?.throwsClause?.throwsSpecifier != nil
_syntax.signature.effectSpecifiers?.throwsClause != nil
}

public var parameters: [FunctionParameter] {
Expand Down
11 changes: 9 additions & 2 deletions Sources/MacroToolkit/SwiftSyntax+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ extension FunctionDeclSyntax {
public var effectSpecifiersOrDefault: FunctionEffectSpecifiersSyntax {
signature.effectSpecifiers
?? FunctionEffectSpecifiersSyntax(
leadingTrivia: " ", asyncSpecifier: nil, throwsClause: nil
leadingTrivia: " ",
asyncSpecifier: nil,
throwsClause: nil
)
}

Expand All @@ -92,7 +94,12 @@ extension FunctionDeclSyntax {
.with(
\.effectSpecifiers,
effectSpecifiersOrDefault
.with(\.throwsClause, isPresent ? ThrowsClauseSyntax(throwsSpecifier: " throws") : nil)
.with(
\.throwsClause,
isPresent
? ThrowsClauseSyntax(throwsSpecifier: .keyword(.throws))
: nil
)
)
)
}
Expand Down
1 change: 0 additions & 1 deletion Tests/MacroToolkitTests/MacroToolkitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ final class MacroToolkitTests: XCTestCase {
withMacroTesting(
macros: testMacros
) {
isRecording = false
super.invokeTest()
}
}
Expand Down

0 comments on commit e706aa9

Please sign in to comment.