TheLarkInn / js-parser-discussions

Discussions & Collaboration on a Unified/Base set of parser features for JavaScript
42 stars 1 forks source link

Investigate Uglify #3

Open xjamundx opened 8 years ago

xjamundx commented 8 years ago

A lot of modern tools use an esprima/estree-compatible parser.

Can we find out how many projects are using uglify and if it should be included in this discussion.

TheLarkInn commented 8 years ago

They consider themself a parser though. And I believe implement AST parsing by hand (no deps) for 1?

xjamundx commented 8 years ago

They do, and it's a cool project but it's not ESTree/Esprima compatible from what I understand. It's kind of it's own thing and not really used by any projects outside of minifiers (let's actually find out).

TheLarkInn commented 8 years ago

Yeah I think there is lessons learned from it. Pros, cons. Features, etc. Maybe we can update this issue to "Investigate Uglify". Thoughts?

xjamundx commented 8 years ago

Updated the OP a bit...

TheLarkInn commented 8 years ago

awesome! Thank you.

mikesherov commented 8 years ago

I believe both Uglify and JSHint both implemented their own parsers to do streaming analysis rather than a separate parse / analyze / transform step.

xjamundx commented 8 years ago

Right and same with jslint :)

RReverser commented 8 years ago

UglifyJS actually does have separate parsing (http://lisperator.net/uglifyjs/parser) / compression (http://lisperator.net/uglifyjs/compress) stages, and allows writing own transformers (http://lisperator.net/uglifyjs/transform).