Releases: CheekyGhost-Labs/SyntaxSparrow
6.1.0
- Adds support for throws clauese identifier type to
EffectsSpecifierstype.
For example,
func executeOrder66() throws(SpecificErrorType) {}can be accessed via:
// Function type
function.signature.effectSpecifiers?.throwsSpecifier // String? - "SpecificErrorType"
function.throwsIdentifier // String? - "SpecificErrorType"- Full Changelog: 6.0.2...6.1.0
6.0.2
- Fixes bug where
isOptionalwas returning incorrect status under certain conditions.
6.0.0
What's Changed
- Adding
successTypeIsOptionalto Result type - Adding
existentialandopaquesupport to EntityType
Full Changelog: 5.1.1...6.0.0
5.1.1
What's Changed
- Added explicit Swift 6.0.x support with default now being 6.1.x
- Fixed bug where Variable.hasSetter would return true for a comptued property with an explicit get keyword.
- Fixed bug where Variable.isComputed would return false for a comptued property with an explicit get keyword.
Full Changelog: 5.1.0...5.1.1
5.1.0
What's Changed
- [CHORE] Adding
Equatableconformance toSyntaxSourceDetails - [CHORE] Exposing auto-conformance of
AssociatedTypetoModifierAssessing
Full Changelog: 5.0.0...5.1.0
5.0.0
What's Changed
- Actively supporting Swift 6
- Actively supporting Swift 6 language mode
- Updated to latest SwiftSyntax (version 600.0.1)
- via initial [PR from manuelkunzdmde] (#55)
Full Changelog: 4.3.0...5.0.0
4.3.0 - Adding switch statement support
What's Changed
- Adding switch statement support
Basic Usage:
A switch has one or more cases, and a case can have one or more items. For example:
switch thing {
case is SomeType: // one item
case .example(let name), .otherExample(let name): // two items
}currently supported types are:
for item in switchCaseTwo.items {
switch item {
case let literal(value):
case let member(name):
case let isTypePattern(type):
case let valueBindingMember(keyWord, name, elements):
case let innerValueBindingMember(name, elements):
case let valueBinding(keyWord, elements):
case let tuple(elements):
case let unsupported(syntax):
case .unsupported(let syntax):
}
}Full Changelog: 4.2.1...4.3.0
Migrating from Apple swift-syntax to SiftLang
Patch release that migrates from the Apple swift-syntax repo to the SwiftLang repo
Such Convenience: 4.2.0 Minor Release
What's Changed
Primarily this release adds multiple convenience methods to different types based on feedback and usage within projects.
TLDR; List
- Adds conveniences for assessing modifiers on types (such as
isPublicandisFinaletc) - Adds convenience extension for searching collections of modifiers for keywords
- Adds
isComputed,isStored,isThrowing, andisAsyncconvenience getters toVariabletype - Adds
rawOutputTypeconvenience getter toFunction.Signaturetype - Adds
isThrowingandisAsyncconvenience getter toFunctiontype - Adds
isThrowingandisAsyncconvenience to Subscript type - Adds
isThrowingandisAsyncconvenience to Initializer type - Adds
isThrowingandisAsyncconvenience to Closure type - Adds
isThrowingandisAsyncconvenience to Accessor type
Modifier Assessing Conveniences
A protocol named ModifierAssessing was added, which a set of types now conform to. This protocol adds two main conveniences:
Firstly, the conforming type (or any collection where the element type is Modifier) can assess what modifiers are present based on a SwiftSyntax.Keyword value and optional detail value.
For example:
// Collection of `Modifier` types
collection.containsKeyword(.public)
collection.containsKeyword(.private)
collection.containsKeyword(.private, detail: "set")
// ModifierAssessing conforming instance
instance.containsModifierWithKeyword(.public)
instance.containsModifierWithKeyword(.private)
collection.containsKeyword(.private, detail: "set")The protocol also provides some common convenience getters for some modifiers:
isPublicisOpenisPrivateisFilePrivateisFinalisInternal
Where applicable, additional conveniences for types exist. For example on the Variable and Initializer types:
// Variable type
variable.isPrivateSetter
variable.isFilePrivateSetter
// Initializer type
initializer.isConvenience
initializer.isRequiredTypes with conformance are:
ActorClassEnumerationExtensionFunctionProtocolDeclStructureSubscriptTypealiasVariableInitializer- Any collection where the type is
Modifier
Effect Specifier Conveniences:
The Variable, Function, and Subscript types can now ask if they are throwing or async:
instance.isThrowing
instance.isAsyncVariable Conveniences:
The Variable type now also supports assessing if it is a computed or stored property:
variable.isComputed
variable.isStoredSuch Convenience: 4.1.0 Minor Release
What's Changed
Primarily this release adds multiple convenience methods to different types based on feedback and usage within projects.
TLDR; List
- Adds conveniences for assessing modifiers on types (such as
isPublicandisFinaletc) - Adds convenience extension for searching collections of modifiers for keywords
- Adds
isComputed,isStored,isThrowing, andisAsyncconvenience getters toVariabletype - Adds
rawOutputTypeconvenience getter toFunction.Signaturetype - Adds
isThrowingandisAsyncconvenience getter toFunctiontype - Adds
isThrowingandisAsyncconvenience to Subscript type
Modifier Assessing Conveniences
A protocol named ModifierAssessing was added, which a set of types now conform to. This protocol adds two main conveniences:
Firstly, the conforming type (or any collection where the element type is Modifier) can assess what modifiers are present based on a SwiftSyntax.Keyword value and optional detail value.
For example:
// Collection of `Modifier` types
collection.containsKeyword(.public)
collection.containsKeyword(.private)
collection.containsKeyword(.private, detail: "set")
// ModifierAssessing conforming instance
instance.containsModifierWithKeyword(.public)
instance.containsModifierWithKeyword(.private)
collection.containsKeyword(.private, detail: "set")The protocol also provides some common convenience getters for some modifiers:
isPublicisOpenisPrivateisFilePrivateisFinalisInternal
Where applicable, additional conveniences for types exist. For example on the Variable and Initializer types:
// Variable type
variable.isPrivateSetter
variable.isFilePrivateSetter
// Initializer type
initializer.isConvenience
initializer.isRequiredTypes with conformance are:
ActorClassEnumerationExtensionFunctionProtocolDeclStructureSubscriptTypealiasVariableInitializer- Any collection where the type is
Modifier
Effect Specifier Conveniences:
The Variable, Function, and Subscript types can now ask if they are throwing or async:
instance.isThrowing
instance.isAsyncVariable Conveniences:
The Variable type now also supports assessing if it is a computed or stored property:
variable.isComputed
variable.isStored