eslint/espree — pull request #27 by nzakas (2014-12-24 22:25:33+00:00)
Title: New: Add JSX parsing (fixes #26)

Took the better part of a day, but have JSX support working now. Details:

* The AST nodes are named with "JSX" as a prefix instead of "XJS" as it is in Esprima-FB. This is to follow the JSX specification.
* Same for other functions, properties, etc. that used to contain "XJS".
* As we haven't yet implemented the spread operator, I had to add some special logic to allow JSX parsing to use it. I chose to do this rather than implement ES6 spread at this point because a) this was much simpler and b) the JSX spec is pretty clear about the use of `...` operator as being separate from ES6.
* At some point, Esprima changed how tokens were created. It used to set `start` and `end` and then munge that into `range` later on. The Harmony branch uses `range` from the start. In order to avoid confusion and a lot of pain, I changed over the tokens to use `range`.
* I ported over all of the JSX tests from Esprima-FB and they are in `tests/fixtures/ecma-features/jsx/`, so we are running against the same test suite.

CC @jeffmo @vjeux