Flow enums parsing#10344
Merged
nicolo-ribaudo merged 7 commits intobabel:masterfrom Oct 29, 2019
gkz:parse-enums
Merged
Conversation
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11410/ |
Member
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Can enums be exported? Is this valid?
export default enum {}
Member
|
/cc: @babel/flow |
Contributor
Author
|
Thank you for reviewing @nicolo-ribaudo! I will update/respond this week |
Contributor
Author
|
Will add support for parsing export of enums |
Contributor
Author
|
I have updated the pull request as per comments |
Contributor
Author
|
Not sure exactly the purpose of the "request a review" button on GitHub, but I clicked it. Actually looking at this it doesn't look like PRs need to be "approved" before they are merged, so feel free to ignore the request (if you have no additional comments) |
nicolo-ribaudo
approved these changes
Oct 15, 2019
Member
|
We need to ✔️ to merge a PR (and I won't merge it until the 7.7.0 release anyway) |
JLHwung
reviewed
Oct 18, 2019
JLHwung
reviewed
Oct 18, 2019
JLHwung
reviewed
Oct 18, 2019
… use BooleaLiteral value
… logic operators, remove reserved word logic modification
JLHwung
approved these changes
Oct 22, 2019
This was referenced Nov 28, 2019
This was referenced Dec 5, 2019
This file contains hidden or 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
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.
Flow is working on adding an optional (and by default off) enums feature, gated by the
experimental.enumsFlowconfig flag. Parsing was implemented in the Flow Parser 1.5 months ago (facebook/flow@e3ee40c).Here, we add support for parsing Flow Enums in the Flow babel-parser plugin, also gated by an option,
enums. This brings Babel's Flow parsing in line with Flow Parser's.Here are some examples:
For more information, see this document: https://github.com/gkz/enums