Skip to content

Go: Fix parsing of a trailing comma in argument list#7273

Merged
greg-at-moderne merged 1 commit intomainfrom
greg-go-token-functions-parse
Apr 3, 2026
Merged

Go: Fix parsing of a trailing comma in argument list#7273
greg-at-moderne merged 1 commit intomainfrom
greg-go-token-functions-parse

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

@greg-at-moderne greg-at-moderne commented Apr 3, 2026

What's changed?

Fixing Go parser with regards to a trailing comma followed by a new line in function call arguments:

func(
  a int,
  b int,
) error{}

Use TrailingComma marker.

What's your motivation?

Otherwise it's not idempotent.

@greg-at-moderne greg-at-moderne self-assigned this Apr 3, 2026
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 3, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review April 3, 2026 13:18
@greg-at-moderne greg-at-moderne merged commit d934b7b into main Apr 3, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-go-token-functions-parse branch April 3, 2026 13:18
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant