I'd really like to avoid forking Esprima - I don't want to become the owner
of yet another JavaScript parser.

There is an Esprima-based tool that has whitespace information included:
https://github.com/millermedeiros/rocambole

There are a couple of concerns I have with it, though:

1. It must traverse the AST first, adding in all the extra info. Given the
number of times we're traversing the AST already, I'm worried about
performance implications (though that could be mitigated if, by virtue of
this one traversal, we can eliminate most of the others).
2. It adds a bunch of stuff to the existing nodes. If rules start depending
on those custom properties instead of the standard SpiderMonkey API, we
could end up with parser lock-in.

There are also a couple of open issues for Esprima related to this:

https://code.google.com/p/esprima/issues/detail?id=438
https://code.google.com/p/esprima/issues/detail?id=256

-N


On Thu, Jan 2, 2014 at 8:44 AM, Ilya Volodin <[email protected]> wrote:

> It is (partially), but it seems unlikely that that pull request is going
> to be accepted. Which is why forking Esprima might be the only way to go.
>
> Thanks,
>
> Ilya Volodin
>
>
> On Thursday, January 2, 2014 2:43:21 AM UTC-5, dieter oberkofler wrote:
>
>> Isn't this what this https://github.com/ariya/esprima/pull/192 pull
>> request by nzakas is all about?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 

______________________________
Nicholas C. Zakas
@slicknet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to