Skip to content

Commit 90e38ee

Browse files
authored
Bump swift-syntax to 5.10.0 (#20)
* Bump swift-syntax to 5.10.0 * wip * bump * updates
1 parent 15916c0 commit 90e38ee

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

Package.resolved

Lines changed: 5 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
)
1818
],
1919
dependencies: [
20-
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
20+
.package(url: "https://github.com/apple/swift-syntax", "509.0.0"..<"511.0.0"),
2121
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.15.0"),
2222
],
2323
targets: [

Tests/MacroTestingTests/DictionaryStorageMacroTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ final class DictionaryStorageMacroTests: BaseTestCase {
2525
} expansion: {
2626
"""
2727
struct Point {
28-
var x: Int = 1 {
28+
var x: Int {
2929
get {
3030
_storage["x", default: 1] as! Int
3131
}
3232
set {
3333
_storage["x"] = newValue
3434
}
3535
}
36-
var y: Int = 2 {
36+
var y: Int {
3737
get {
3838
_storage["y", default: 2] as! Int
3939
}

Tests/MacroTestingTests/MacroExamples/AddBlocker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ public struct AddBlocker: ExpressionMacro {
9393
context.diagnose(diag)
9494
}
9595

96-
return result.asProtocol(FreestandingMacroExpansionSyntax.self)!.argumentList.first!.expression
96+
return result.asProtocol(FreestandingMacroExpansionSyntax.self)!.arguments.first!.expression
9797
}
9898
}

Tests/MacroTestingTests/MacroExamples/FontLiteralMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public enum FontLiteralMacro: ExpressionMacro {
2222
in context: some MacroExpansionContext
2323
) throws -> ExprSyntax {
2424
let argList = replaceFirstLabel(
25-
of: node.argumentList,
25+
of: node.arguments,
2626
with: "fontLiteralName"
2727
)
2828
return ".init(\(argList))"

Tests/MacroTestingTests/MacroExamples/StringifyMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public enum StringifyMacro: ExpressionMacro {
2828
of node: some FreestandingMacroExpansionSyntax,
2929
in context: some MacroExpansionContext
3030
) -> ExprSyntax {
31-
guard let argument = node.argumentList.first?.expression else {
31+
guard let argument = node.arguments.first?.expression else {
3232
fatalError("compiler bug: the macro does not have any arguments")
3333
}
3434

Tests/MacroTestingTests/MacroExamples/URLMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public enum URLMacro: ExpressionMacro {
2121
of node: some FreestandingMacroExpansionSyntax,
2222
in context: some MacroExpansionContext
2323
) throws -> ExprSyntax {
24-
guard let argument = node.argumentList.first?.expression,
24+
guard let argument = node.arguments.first?.expression,
2525
let segments = argument.as(StringLiteralExprSyntax.self)?.segments,
2626
segments.count == 1,
2727
case .stringSegment(let literalSegment)? = segments.first

Tests/MacroTestingTests/MacroExamples/WarningMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public enum WarningMacro: ExpressionMacro {
2121
of node: some FreestandingMacroExpansionSyntax,
2222
in context: some MacroExpansionContext
2323
) throws -> ExprSyntax {
24-
guard let firstElement = node.argumentList.first,
24+
guard let firstElement = node.arguments.first,
2525
let stringLiteral = firstElement.expression
2626
.as(StringLiteralExprSyntax.self),
2727
stringLiteral.segments.count == 1,

Tests/MacroTestingTests/ObservableMacroTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ final class ObservableMacroTests: XCTestCase {
7070
}
7171
}
7272
73-
var isHappy: Bool = true {
73+
var isHappy: Bool {
7474
get {
7575
_registrar.beginAccess(\.isHappy)
7676
defer {

0 commit comments

Comments
 (0)