swift-syntax
swift-syntax copied to clipboard
A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.
When applying an accessor macro to e.g. a struct, `assertMacroExpansion` will currently happily swallow the attribute. It should, however, emit an error that accessor macros can’t be applied to structs....
| | | |------------------|-----------------| |Previous ID | SR-778 | |Radar | None | |Original Reporter | chriseidhof (JIRA User) | |Type | Bug | |Status | Reopened | |Resolution |...
**Description** Almost everything in Swift uses camelCase. A notable exception is `associatedtype`. If a user happens to write `associatedType` in a protocol declaration we currently provide rather poor diagnostics, assuming...
Resolves #2036 Open this PR to start discussion and getting help when needed.
| | | |------------------|-----------------| |Previous ID | SR-8510 | |Radar | rdar://problem/32419789 | |Original Reporter | @huonw | |Type | Bug | |Status | In Progress | |Resolution | |...
| | | |------------------|-----------------| |Previous ID | SR-11827 | |Radar | rdar://problem/57418525 | |Original Reporter | @dabrahams | |Type | Bug | Additional Detail from JIRA | | | |------------------|-----------------|...
### Description The `GroupedDiagnostics` formatter takes an array of `Diagnostic`s that it formats into a buffer. However, it only handles the top-level diagnostic messages, not any [attached notes](https://github.com/apple/swift-syntax/blob/main/Sources/SwiftDiagnostics/Diagnostic.swift#L30C3-L31C1)---which also have...
### Description `BasicFormat` cannot indent the closure body when it's nested in a `LabeledExprSyntax`. ### Steps to Reproduce ```swift let builder = ExprSyntax( """ .init( name: { if let name...
## Summary **Work in progress, not ready for a full-on review, ideas and feedback welcome!** This pull request closes #1984. Instead of doing one-off initializers by hand, like in #2127...
Currently, if you do the following ```swift let node = EnumCaseParameterSyntax(firstName: "label", type: TypeSyntax("MyType")) print(node.formatted()) ``` you get `label MyType`, which is surprising because the colon is missing and you...