Closed syranide closed 8 years ago
E4X does this. They also handle comments and whitespace differently because it doesn't follow the normal tokenization rules. This is annoying but required.
This is definitely a bug in both the spec and implementation.
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
I'm pretty sure this has been resolved already or is irrelevant in-terms of the spec?
I haven't read it in detail yet (so forgive me if I missed it), but we may need to add some additional documentation detailing the need for a separate token table when parsing JSX (see facebook/esprima#39).
There are two options here as I see it:
The upside of 1 is that misplaced tokens emit familiar errors and the implementation is simpler, but also a bit more fragile. With option 1
<Comp ==
would yield an error for==
instead of just=
.