This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 656
feat(rome_formatter): format export
syntax
#2008
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying with
|
Latest commit: |
ff5afa2
|
Status: | ✅ Deploy successful! |
Preview URL: | https://5d7d3723.tools-8rn.pages.dev |
d0d3997
to
939dde6
Compare
export
syntax
9 tasks
726243d
to
ed1bcd7
Compare
65a5c7e
to
899ec72
Compare
Parser conformance results on ubuntu-latestTS
T262
|
MichaReiser
reviewed
Jan 31, 2022
Comment on lines
+10
to
+14
let semicolon = if let Some(semicolon) = &self.semicolon_token() { | ||
formatter.format_token(semicolon)? | ||
} else { | ||
token(";") | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should there be a helper for this common use case? If there isn't one already (CC: @leops )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could have been written as formatter.format_token(&self.semicolon_token()).unwrap_or_else(|| token(";"))
but that's being deprecated in #2012 in favor of self.semicolon_token().format_or(formatter, || token(";"))
leops
reviewed
Feb 1, 2022
c19a3fd
to
ff5afa2
Compare
leops
approved these changes
Feb 1, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR is part of #1996
It implements the formatting of
export ...
syntax.Test Plan
New tests to cover the majority of cases