Closed IngwiePhoenix closed 8 years ago
It's not really possible to extend esprima via exports, which is why every language extension (including JSX with esprima-fb
) forks it and hacks on the main esprima.js file :)
(Esprima 3 is being completely refactored and has a parser delegator, but both oj and JSX need to extend the tokenizer; hence, they will likely continue to be forks).
Ohh, I see! Now, that makes sense. :)
Thanks for the info!
I was just doing a little bit of research on JSX and other things alike and came across the fact, that Facebook forked
esprima
to introduce JSX to it - so, it basically becameesprima-fb
.My first thought was, "Oh cool! I could fork OJ and see if it does JSX". Only to realize, that this was certainly not possible.
So I wanted to ask why you are using a copy of Esprima in
lib/
that has been modified to understand OJ? Isn't it possible to extend esprima through it's exports instead? It just confused me, so I decided to ask. :)