Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Implement JSX syntax #18

Closed
nzakas opened this issue Mar 4, 2016 · 8 comments
Closed

Implement JSX syntax #18

nzakas opened this issue Mar 4, 2016 · 8 comments

Comments

@nzakas
Copy link
Member

nzakas commented Mar 4, 2016

Phase 2 is to add JSX syntax support into this parser. This would involve:

  1. Converting the TypeScript JSX syntax tree into an ESTree-compatible one.
  2. Convert the TypeScript tokens into Esprima-style tokens.
  3. Making the result pass the JSX tests that are already tests in tests/fixtures/ecma-features/jsx.

@JamesHenry are you interested in taking a stab at this?

@JamesHenry
Copy link
Member

Thanks a lot for mapping out those steps, yes I'll try and find some time this weekend!

@JamesHenry
Copy link
Member

I have made some progress on this, but I have some questions on how to approach some of the conversions. What is the best way for us to chat about that? Gitter?

@JamesHenry
Copy link
Member

There seem to be some fundamental issues in our more "interesting" jsx tests at the moment, and I have begun reporting them in the TypeScript repo:

@nzakas
Copy link
Member Author

nzakas commented Mar 6, 2016

If I'm on gitter, yes, though I'd prefer such issues be documented here so we have a good record.

@JamesHenry
Copy link
Member

Great point - if I have concrete questions I will post them here. I am going to stop now as this has ended up dominating my weekend, but I have made a lot of progress (as much as anything in my personal understanding of eslint internals, ASTs and tsc output :) ).

The current status is:

  • 3 tests are unrunnable due to the issues reported to TS above
  • 3 remaining non-passing tests

I'll keep you updated on my progress as and when I find time during my evenings next week!

@nzakas
Copy link
Member Author

nzakas commented Mar 7, 2016

Awesome, thanks so much!

@nzakas
Copy link
Member Author

nzakas commented Mar 9, 2016

If you manage to get the three failing tests working, I'd say just remove the tests that fail due to the TS issues and we can handle those as bugs.

@JamesHenry
Copy link
Member

Just noting down this third related TS issue here for reference: microsoft/TypeScript#7471

@nzakas nzakas closed this as completed in 0eddb71 Mar 18, 2016
nzakas added a commit that referenced this issue Mar 18, 2016
New: Implements JSX syntax (fixes #18)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants