`parseMacroRoleArguments` should allow trailing commas
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in Sources/SwiftParser/Attributes.swift at parseMacroRoleArguments, linked from the issue. Review how trailing-comma support is configured for macro role and custom attributes, then verify that macro role argument lists accept a trailing comma and are represented as a regular LabeledExprListSyntax.
Written by the indexing model from the issue text.
Description
Description
Discovered via https://github.com/swiftlang/swift-format/issues/1178.
parseMacroRoleArguments explicitly disallows trailing commas, but that seems like an oversight; as far as the user is concerned, that looks (and is represented in the AST) as a regular LabeledExprListSyntax, and the intent of SE-0439 was that the language would support trailing commas in those kinds of lists.
From what I can tell in the Git history, as trailing comma support was rolled out, the argument was added and defaulted to false and then it was updated for custom attributes but not for macro role attributes.
Steps to Reproduce
No response
- Dominant language
- Swift
- Stars
- 3.7k
- Forks
- 554
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 22
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from swiftlang/swift-syntax
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
swiftlang/swift-syntax#3227 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
swiftlang/swift-syntax#3444 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
swiftlang/swift-syntax#3440 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
swiftlang/swift-syntax#3438 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
swiftlang/swift-syntax#3322 · 1 comment ·
All issues in swiftlang/swift-syntax
Similar issues
-
type: docs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
googleapis/google-cloud-swift#971 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mozilla-mobile/firefox-ios#35743 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
manaflow-ai/cmux#13417 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ionic-team/capacitor#8616 ·