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 try statements. #1332

Merged
merged 6 commits into from
Dec 5, 2023
Merged

Format try statements. #1332

merged 6 commits into from
Dec 5, 2023

Conversation

kallentu
Copy link
Member

@kallentu kallentu commented Nov 27, 2023

  • Added a new TryPiece for try statements. They are very similar to if statements, but I kept them separate.
  • Each TryPiece has one or more _TrySectionPiece which is a catch or finally header and block. They're all formatted similarly.
  • Tests for trys and their comments.

Will also remove the temp dir tests after submission.

(I'll send this over to Nate for readability after approval :D )

@kallentu kallentu requested a review from munificent November 27, 2023 19:43
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 looks great, especially the tests. :D

lib/src/front_end/piece_factory.dart Show resolved Hide resolved
lib/src/piece/try.dart Outdated Show resolved Hide resolved
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.

Ship it!

lib/src/front_end/piece_factory.dart Show resolved Hide resolved
@kallentu
Copy link
Member Author

@srawlins If you could help me look at this for readability (so I can add this as a contribution haha), that'd be great. Thank you :)

Sending to Sam 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 srawlins November 30, 2023 21:56
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

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

Approved for readability

@kallentu kallentu merged commit 214f289 into main Dec 5, 2023
7 checks passed
@kallentu kallentu deleted the try_catch branch December 5, 2023 18:55
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.

3 participants