Skip to content

parseMacroRoleArguments should allow trailing commas #3306

@allevato

Description

@allevato

Description

Discovered via swiftlang/swift-format#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions