Skip to content
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 JSX nodes to the JS2 AST #527

Open
jacksonrayhamilton opened this issue Jun 4, 2019 · 1 comment
Open

Add JSX nodes to the JS2 AST #527

jacksonrayhamilton opened this issue Jun 4, 2019 · 1 comment

Comments

@jacksonrayhamilton
Copy link
Contributor

Continuing the discussion from here in light of my comment from here

It would be nice if js2-mode added JSX nodes to its AST, like @felipeochoa’s rjsx-mode does. This issue proposes adding such a feature to js2-mode, most likely by migrating parsing code and classes from RJSX to JS2.

Such an extension would make JS2 capable of linting and highlighting JSX code. With these capabilities available, we can justify inheriting js-mode’s capability of automatically-detecting the presence of JSX. (These matters will be addressed in separate issues.)

Once all those features are implemented, js2-mode will behave more like a parent of js-mode. Without them, js2-mode would be less capable of handling JSX than js-mode; js2-mode would continue to rely on rjsx-mode in order to fully support JSX.

@dgutov
Copy link
Collaborator

dgutov commented Jun 4, 2019

At some point, adding JSX support meant doing away with supporting E4X. The latter technology seems to have very much died in the meantime, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants