|
35 | 35 | - `String.isValidIdentifier(for:)`
|
36 | 36 | - Description: `SwiftParser` adds an extension on `String` to check if it can be used as an identifier in a given context.
|
37 | 37 | - Pull Request: https://github.com/apple/swift-syntax/pull/2434
|
38 |
| - |
| 38 | + |
39 | 39 | - `MacroDeclSyntax.expand`
|
40 | 40 | - the `expand(argumentList:definition:replacements:)` method gains a new parameter 'genericReplacements:' that is defaulted to an empty array.
|
41 | 41 | - The method's signature is now `expand(argumentList:definition:replacements:genericReplacements:)`
|
|
62 | 62 | - Description: `IncrementalEdit` used to store the range that was replaced and the length of the replacement but not the replacement bytes by itself. `IncrementalEdit` now has a `replacement` property that contains the replacement bytes.
|
63 | 63 | - Pull Request: https://github.com/apple/swift-syntax/pull/2527
|
64 | 64 |
|
| 65 | +- `DeclGroupSyntax.introducer` |
| 66 | + - Description: The `DeclGroupSyntax` trait has an extra `introducer` property, ie. the keyword that introduces the declaration. |
| 67 | + - Issue: https://github.com/apple/sourcekit-lsp/issues/2535 |
| 68 | + - Pull Request: https://github.com/apple/swift-syntax/pull/2539 |
| 69 | + |
65 | 70 | ## API Behavior Changes
|
66 | 71 |
|
67 | 72 | ## Deprecations
|
68 |
| - |
| 73 | + |
69 | 74 | - Child Choice Node Casts
|
70 | 75 | - Description: `is`, `as`, and `cast` methods for types not contained in the choice node are marked as deprecated. The deprecated methods will emit a warning, indicating that the cast will always fail.
|
71 | 76 | - Issue: https://github.com/apple/swift-syntax/issues/2092
|
|
81 | 86 | - `MacroExpansion{Error|Warning|FixIt}Message` moved to the `SwiftSyntaxMacros` module
|
82 | 87 | - Description: Move the `MacroExpansion{Error|Warning|FixIt}Message` types from the `SwiftSyntaxMacroExpansion` module to `SwiftSyntaxMacros`. Deprecated typealiases in `SwiftSyntaxMacroExpansion` forward to `SwiftSyntaxMacros`.
|
83 | 88 | - Pull request: https://github.com/apple/swift-syntax/pull/2338
|
84 |
| - - Notes: The expansion diagnostic messages were defined in `SwiftSyntaxMacroExpansion`, which is intended as an implementation detail of the plugin server and should not need to be imported by macros. |
| 89 | + - Notes: The expansion diagnostic messages were defined in `SwiftSyntaxMacroExpansion`, which is intended as an implementation detail of the plugin server and should not need to be imported by macros. |
85 | 90 |
|
86 | 91 | - `EditorPlaceholderDeclSyntax` and `EditorPlaceholderExprSyntax`:
|
87 | 92 | - Description: `EditorPlaceholderDeclSyntax` and `EditorPlaceholderExprSyntax` are now deprecated and placeholders are instead parsed as identifiers within a `MissingDeclSyntax` or `DeclReferenceExprSyntax`.
|
|
97 | 102 | - Effect specifiers:
|
98 | 103 | - Description: The `unexpectedAfterThrowsSpecifier` node of the various effect specifiers has been removed.
|
99 | 104 | - Pull request: https://github.com/apple/swift-syntax/pull/2219
|
100 |
| - - Migration steps: Check `unexpectedBetweenThrowsSpecifierAndThrownError` and `unexpectedAfterThrownError` instead. |
| 105 | + - Migration steps: Check `unexpectedBetweenThrowsSpecifierAndThrownError` and `unexpectedAfterThrownError` instead. |
101 | 106 |
|
102 | 107 | - `SyntaxKind` removed conformance to `CaseIterable`
|
103 |
| - - Description: `SyntaxKind` no longer conforms to `CaseIterable` since there is no good use case to iterate over all syntax kinds. |
104 |
| - - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
| 108 | + - Description: `SyntaxKind` no longer conforms to `CaseIterable` since there is no good use case to iterate over all syntax kinds. |
| 109 | + - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
105 | 110 | - Migration steps: Exhaustively check all the syntax nodes that your program supports. There should be no use case to iterate over all cases in `SyntaxKind`.
|
106 | 111 |
|
107 | 112 | - `IntegerLiteralExprSyntax.Radix` removed conformance to `CaseIterable`
|
108 |
| - - Description: `IntegerLiteralExprSyntax.Radix` no longer conforms to `CaseIterable` since there is no good use case to iterate over all radix kinds. |
| 113 | + - Description: `IntegerLiteralExprSyntax.Radix` no longer conforms to `CaseIterable` since there is no good use case to iterate over all radix kinds. |
109 | 114 | - Pull request: https://github.com/apple/swift-syntax/pull/2292
|
110 | 115 | - Migration steps: There should be no use case to iterate over all cases in `IntegerLiteralExprSyntax.Radix`.
|
111 | 116 |
|
|
119 | 124 | - The new classification case covers the first names of parameters in function-like declarations and the label of arguments in function-like calls.
|
120 | 125 | - Pull request: https://github.com/apple/swift-syntax/pull/2375
|
121 | 126 | - Migration steps: In exhaustive switches over `SyntaxClassification`, cover the new case.
|
122 |
| - |
| 127 | + |
123 | 128 | - `SyntaxEnum` and `SyntaxKind` gained new cases: `throwsClause`
|
124 | 129 | - The new cases cover the newly introduced `ThrowsClauseSyntax`
|
125 | 130 | - Pull request: https://github.com/apple/swift-syntax/pull/2379
|
|
129 | 134 | - Description: The new property provides the lexical context in which the macro is expanded, and has several paired API changes. Types that conform to `MacroExpansionContext` will need to implement this property. Additionally, the `HostToPluginMessage` cases `expandFreestandingMacro` and `expandAttachedMacro` now include an optional `lexicalContext`. Finally, the `SyntaxProtocol.expand(macros:in:indentationWidth:)` syntactic expansion operation has been deprecated in favor of a new version `expand(macros:contextGenerator:indentationWidth:)` that takes a function produces a new macro expansion context for each expansion.
|
130 | 135 | - Pull request: https://github.com/apple/swift-syntax/pull/1554
|
131 | 136 | - Migration steps: Add the new property `lexicalContext` to any `MacroExpansionContext`-conforming types. If implementing the host-to-plugin message protocol, add support for `lexicalContext`. For macro expansion operations going through `SyntaxProtocol.expand`, provide a context generator that creates a fresh context including the lexical context.
|
132 |
| - |
| 137 | + |
133 | 138 | - `TriviaPiece.isBackslash` in `SwiftParserDiagnostics` removed
|
134 | 139 | - Description: `TriviaPiece.isBackslash` was not intended to be public API.
|
135 |
| - - Pull request: xxx |
| 140 | + - Pull request: https://github.com/apple/swift-syntax/pull/2531 |
136 | 141 | - Migration steps: Use `if case .backslash = triviaPiece` instead
|
137 | 142 |
|
138 | 143 | ## Template
|
|
0 commit comments