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
Flow enums parsing #10344
Flow enums parsing #10344
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11410/ |
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.
Can enums be exported? Is this valid?
export default enum {}
/cc: @babel/flow |
Thank you for reviewing @nicolo-ribaudo! I will update/respond this week |
Will add support for parsing export of enums |
I have updated the pull request as per comments |
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) |
We need to ✔️ to merge a PR (and I won't merge it until the 7.7.0 release anyway) |
… use BooleaLiteral value
… logic operators, remove reserved word logic modification
Flow is working on adding an optional (and by default off) enums feature, gated by the
experimental.enums
Flowconfig 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