I agree on forking Esprima. I threw it out there as a last resort type of 
thing. Rocambole looks very interesting. It does do another traversal 
through AST, but in our case it will speed things up, because we do 
multiple traversals for things that Rocambole does in a single one. If we 
are afraid of custom properties on nodes, we can probably put a pull 
request into Rocambole and make those optional, and then turn them off for 
eslint. I do like the idea of having extra node types, it will allow us to 
create rules for things like whitespaces directly.

Both of the issues in Esprima have been opened for a while now, and it 
doesn't look like there's any movement on them. I would love to only have 
to rely on Esprima for all parsing needs, but I'm not sure if it will every 
support everything we need out of the box.

Thanks,

Ilya Volodin

On Thursday, January 2, 2014 12:06:04 PM UTC-5, Nicholas Zakas wrote:

> 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]<javascript:>
> > 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] <javascript:>.
>> 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