Skip to content

Commit

Permalink
Provides release notes entries for new APIs
Browse files Browse the repository at this point in the history
Provides release notes entries for:

- `ClosureCaptureSyntax.init` swiftlang#2127
- `EnumCaseParameterSyntax.init`
  swiftlang#2112

Co-authored-by: Mateusz Bąk <bakmatthew@icloud.com>
  • Loading branch information
natikgadzhi and Matejkob committed Sep 1, 2023
1 parent 8fb3713 commit 440b6da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Release Notes/510.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
## New APIs

- `SyntaxStringInterpolation.appendInterpolation(_: (some SyntaxProtocol)?)`
- Descriptions: Allows optional syntax nodes to be used inside string interpolation of syntax nodes. If the node is `nil`, nothing will get added to the string interpolation.
- Description: Allows optional syntax nodes to be used inside string interpolation of syntax nodes. If the node is `nil`, nothing will get added to the string interpolation.
- Pull Request: https://github.com/apple/swift-syntax/pull/2085
- `SyntaxCollection.index(at:)`
- Description: Returns the index of the n-th element in a `SyntaxCollection`. This computation is in O(n) and `SyntaxCollection` is not subscriptable by an integer.
- Issue: https://github.com/apple/swift-syntax/issues/1984
- Pull Request: https://github.com/apple/swift-syntax/pull/2014
- Convenience initializer `ClosureCaptureSyntax.init()`
- Description: Provides a convenience initializer for `ClosureCaptureSyntax` that takes a concrete `name` argument and automatically adds `equal = TokenSyntax.equalToken()` to it.
- Pull Request: https://github.com/apple/swift-syntax/pull/2127
- Convenience initializer `EnumCaseParameterSyntax.init()`
- Description: Provides a convenience initializer for `EnumCaseParameterSyntax` that takes a concrete `firstName` value and adds `colon = TokenSyntax.colonToken()` automatically to it.
- Issue: https://github.com/apple/swift-syntax/issues/1984
- Pull Request: https://github.com/apple/swift-syntax/pull/2112

## API Behavior Changes

Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftSyntax/Convenience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

extension ClosureCaptureSyntax {

/// Creates a `ClosureCaptureSyntax` with a `name`, and automatically adds an `equal` token to it since the name is non-optional.
/// Creates a ``ClosureCaptureSyntax`` with a `name`, and automatically adds an `equal` token to it since the name is non-optional.
///
/// - SeeAlso: ``ClosureCaptureSyntax/init(leadingTrivia:_:specifier:_:name:_:equal:_:expression:_:trailingComma:_:trailingTrivia:)``.
///
Expand All @@ -39,7 +39,7 @@ extension ClosureCaptureSyntax {

extension EnumCaseParameterSyntax {

/// Creates an `EnumCaseParameterSyntax` with a `firstName`, and automatically adds a `colon` to it.
/// Creates an ``EnumCaseParameterSyntax`` with a `firstName`, and automatically adds a `colon` to it.
///
/// - SeeAlso: For more information on the arguments, see ``EnumCaseParameterSyntax/init(leadingTrivia:_:modifiers:_:firstName:_:secondName:_:colon:_:type:_:defaultArgument:_:trailingComma:_:trailingTrivia:)``
///
Expand Down

0 comments on commit 440b6da

Please sign in to comment.