Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] Type analisys for JSDT

Hi all,

I've been thinking about missing code assist, search etc caused by loosing type inference after switch to new parser.
First obvious candidate for type inference engine is widely used Tern [1] of course. However using it has
some drawbacks like double parsing, JS->Java->JS data transfer etc. I thought about writing something similar based on
Tern's idea, but reading some papers on the subject of JIT/static type analysis I stumbled upon very interesting project
TAJS: Type Analyzer for JavaScript [2].

It has the Eclipse plugin and provides lot of useful type information. It seems to be a great candidate for the JSDT's
inference engine. Even though it's possible to use it as is (just as existing plugin) I believe both TAJS and JSDT may
benefit from more tight integration. I mean common AST for example.

TAJS uses the google closure compiler parser and thus its AST tree format. We use esprima and convert it to our AST.
It's possible either come to some unified format or use google's or use JSDT's.

I mentioned closure compiler parser some time ago, and its usage in one more projects makes me think about it again.

So, what do you think about possible cooperation with TAJS to our mutual benefit? :-)

[1] http://ternjs.net/
[2] http://www.brics.dk/TAJS/


-- 
Eugene Melekhov



Back to the top