-
Notifications
You must be signed in to change notification settings - Fork 73
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
update to use Parser.acorn #102
Conversation
@marijnh @RReverser Would you take a look at this PR? |
@RReverser Would you be open to moving the npm package to the |
I still don't really understand this change on either Acorn side or Acorn-JSX side, but if you're happy with it and it helps, it's fine by me. |
@marijnh Done (I think). |
I'm not sure if I'm in that org though? |
@RReverser It seems our org is called |
I would immediately email npm support about that one. |
Well, this finally got released (5.1.0) just now |
Thank you very much! |
This PR updates
acorn-jsx
to useParser.acorn
property thatacorn@7.1.0
added. This is to solve the problem acornjs/acorn#870 describes.The
require("acorn-jsx").tokTypes
property is as-is, the JSX token types for theacorn
of the peer dependency.This PR adds a static property
acornJsx
to the enhancedParser
class.That static property exposes the actual JSX token types to other plugins that want to modify JSX tokens. The
JsxParser.acornJsx
andrequire("acorn-jsx").tokTypes
are the same instance in most situation. But those can be different in the special situation acornjs/acorn#870 describes.Espree will use the
JsxParser.acornJsx
to modify tokens.