-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add support for the Meriyah parser #1105
base: master
Are you sure you want to change the base?
Conversation
Meriyah is a fast and modern implementation of ECMAScript parser
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.
Neat that it's so much faster than Acorn or Esprima. How does the speed compare to Babel?
Small code comments below.
Caused `npm run format`.
Babel is among the slowest, but my benchmark uses only jQuery and Marionette.CollectionView. I replaced an old esprima in the RequireJS optimizer with meriyah to gain better performance and support of modern language. It works well so far. |
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.
Good to know, thanks. These changes look good to me! The maintainers may have other comments.
Bump -- this looks like a good addition. In case it's helpful: Meriyah is used by astring & nexe. And indirectly by react-scanner, by way of |
This isn't something I feel I can decide whether to incorporate. I'll leave it to @benjamn. |
Meriyah is a fast and modern implementation of ECMAScript parser.
Making the comment types
SingleLine
andMultiLine
recognised byast-types
would make the parse wrapper shorter and on par with the recognition of other comment types returned by Esprima/Babel. I just converted the comment types, so that the tests succeeded and the first version of this submission was shorter.