Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format record type annotations. #1346

Merged
merged 10 commits into from
Jan 9, 2024
Merged

Format record type annotations. #1346

merged 10 commits into from
Jan 9, 2024

Conversation

kallentu
Copy link
Member

As title says, formats record type annotations.

  • Used a DelimitedListBuilder for these since they work similarly to parameter lists, but not quite the same.
  • Added a few comment tests, just to make sure they work.

The comments show how the splitting has changed for these, specifically in the case of:

>>> Split positional types.
(TypeName,TypeName,TypeName,TypeName) x;
<<<
(
  TypeName,
  TypeName,
  TypeName,
  TypeName,
) x;

which no longer splits like:

(
  TypeName,
  TypeName,
  TypeName,
  TypeName,
)
x;

@kallentu kallentu marked this pull request as ready for review December 27, 2023 21:04
Copy link
Member

@munificent munificent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic. The tests are excellent. I made a few suggests on the code, but it's all minor stuff. This is a nice Christmas present to come back to. :)

@kallentu
Copy link
Member Author

kallentu commented Jan 8, 2024

Sending to @sigmundch for readability comments. Please review as a readability CL and add your feedback at go/dart-team-readability-feedback

@kallentu kallentu requested a review from sigmundch January 8, 2024 22:46
Copy link
Member

@sigmundch sigmundch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kallentu kallentu merged commit 295e4c5 into main Jan 9, 2024
7 checks passed
@kallentu kallentu deleted the record-types branch January 9, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants