Skip to content

Commit 71822b3

Browse files
authored
Adopt swift-syntax 5.10. (#249)
1 parent 768264e commit 71822b3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let package = Package(
3333
],
3434

3535
dependencies: [
36-
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
36+
.package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.1"),
3737
],
3838

3939
targets: [

[email protected]

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let package = Package(
3333
],
3434

3535
dependencies: [
36-
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
36+
.package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.1"),
3737
],
3838

3939
targets: [

Sources/TestingMacros/ConditionMacro.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ extension ConditionMacro {
168168
// are allowed.
169169

170170
// Include the original arguments first.
171-
result += macro.argumentList.lazy.map(Argument.init)
171+
result += macro.arguments.lazy.map(Argument.init)
172172

173173
if let trailingClosure = macro.trailingClosure {
174174
// Since a trailing closure does not (syntactically) include a label, we
@@ -212,7 +212,7 @@ public struct AmbiguousRequireMacro: ConditionMacro {
212212
of macro: some FreestandingMacroExpansionSyntax,
213213
in context: some MacroExpansionContext
214214
) throws -> ExprSyntax {
215-
if let argument = macro.argumentList.first {
215+
if let argument = macro.arguments.first {
216216
_checkAmbiguousArgument(argument.expression, in: context)
217217
}
218218

Sources/TestingMacros/Support/DiagnosticMessage.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct DiagnosticMessage: SwiftDiagnostics.DiagnosticMessage {
3434
static func condition(_ condition: ExprSyntax, isAlways value: Bool, in macro: some FreestandingMacroExpansionSyntax) -> Self {
3535
Self(
3636
syntax: Syntax(condition),
37-
message: "#\(macro.macro.textWithoutBackticks)(_:_:) will always \(value ? "pass" : "fail") here; use Bool(\(condition)) to silence this warning",
37+
message: "#\(macro.macroName.textWithoutBackticks)(_:_:) will always \(value ? "pass" : "fail") here; use Bool(\(condition)) to silence this warning",
3838
severity: value ? .note : .warning
3939
)
4040
}
@@ -50,7 +50,7 @@ struct DiagnosticMessage: SwiftDiagnostics.DiagnosticMessage {
5050
static func asExclamationMarkIsEvaluatedEarly(_ expr: AsExprSyntax, in macro: some FreestandingMacroExpansionSyntax) -> Self {
5151
return Self(
5252
syntax: Syntax(expr.asKeyword),
53-
message: "The expression \(expr.trimmed) will be evaluated before #\(macro.macro.textWithoutBackticks)(_:_:) is invoked; use as? instead of as! to silence this warning",
53+
message: "The expression \(expr.trimmed) will be evaluated before #\(macro.macroName.textWithoutBackticks)(_:_:) is invoked; use as? instead of as! to silence this warning",
5454
severity: .warning
5555
)
5656
}

0 commit comments

Comments
 (0)