swift-syntax icon indicating copy to clipboard operation
swift-syntax copied to clipboard

A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.

Results 147 swift-syntax issues
Sort by recently updated
recently updated
newest added

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....

Macros

| | | |------------------|-----------------| |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...

SwiftParser

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 | |...

SwiftParser

| | | |------------------|-----------------| |Previous ID | SR-11827 | |Radar | rdar://problem/57418525 | |Original Reporter | @dabrahams | |Type | Bug | Additional Detail from JIRA | | | |------------------|-----------------|...

SwiftParser

### 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...

bug
good first issue

### 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...

bug
BasicFormat

## 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...

enhancement
good first issue