Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] WTP JSDT meeting 20151117

On 20 Nov 2015, at 10:33, Doug Schaefer wrote:

As I stated previously, we will be using Acorn for QML. We’ve had good success with it. I don’t understand the urge to use something else but have to trust Gorkem has done a pretty good analysis and that at least JSX will be supported in the new system. If not, we could do a JSX editor that uses Acorn and leave esprima to the others.

I think ES6 support represents roughly the same problem as JSX or QML support. Parser is essential but only a part of the puzzle for supporting ES6 or extensions such as JSX or QML.
So let me explain.

Unfortunately, JSDT is "blessed" with not one but two AST models. The current parser parses the source files to what one may call "internal AST model". This model is used to provide most of the functionality in jsdt.core. The second model, which can be called the "external AST model" is the one used by jsdt.ui and jsdt.debug and hopefully third parties.

In order for JSDT's current services to consume ES6, or JSX or QML. These two models needs to be updated to support the new constructs, properties etc. To make matters more exciting, other than JSDT's current parser, any other parser that we bring in has to convert the AST created by the new parser to these two models.

First of all updating and maintaining two models is wasteful. Since "external AST model" is somewhat in a better shape and can not really be replaced without the whole UI and debug plugins my plan is to keep updating supporting the external AST model. At the same time, I do not want to expose the AST model of the new parser to the world so whatever parser we bring in will immediately convert to the supported "external AST model". This will ensure that JSDT can easily swap parsers in the future. Currently, I am thinking about starting with Esprima and on Nashorn runtime because Nashorn was the only runtime option that does not require a CQ process and in my tests esprima
behaved better than Acorn on that runtime.



From: <wtp-dev-bounces@xxxxxxxxxxx<mailto:wtp-dev-bounces@xxxxxxxxxxx>> on behalf of Angelo zerr <angelo.zerr@xxxxxxxxx<mailto:angelo.zerr@xxxxxxxxx>> Reply-To: "General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx<mailto:wtp-dev@xxxxxxxxxxx>>
Date: Friday, November 20, 2015 at 5:14 AM
To: "General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx<mailto:wtp-dev@xxxxxxxxxxx>>
Subject: Re: [wtp-dev] WTP JSDT meeting 20151117

Gorkem for esprima use parser, the only thing that I find it's shame is that acorn (as you know) provides the capability to extends it to support QML, JSX, etc

I'm not sure that esprima can do that.

Regard's Angelo

2015-11-18 0:05 GMT+01:00 Gorkem Ercan <gorkem.ercan@xxxxxxxxx<mailto:gorkem.ercan@xxxxxxxxx>>:

Agenda is updated with the minutes,
and the performance comparison blog entry is online now.

On 17 Nov 2015, at 12:02, Gorkem Ercan wrote:

The agenda for today's call is at as usual
wtp-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

wtp-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top