TheLarkInn / js-parser-discussions

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

Possibly Clarify Esprima-based Parsers vs. Others #7

Closed xjamundx closed 8 years ago

xjamundx commented 8 years ago

There is a core group of parsers that basically follow the API and AST from Esprima. When people talk about JS parsers I pretty much just think about this fairly short list:

And then there are other parsers of various kinds that aren't really compatible for various reasons. You mention uglify, typescript, flow and the others I assume would fall into this category. Is sweetJS even a parser? I think you should separate these two classes of parsers in some way. Either only focus on the esprima-inspired parsers or lump them together in some way, because they have the same base APIs, etc.

mikesherov commented 8 years ago

espree is a thin wrapper around acorn at this point. I wouldn't include it in the list of parsers.

Really, it's Esprima / Acorn / Babylon. 2 out of the 3 conform to ESTree

xjamundx commented 8 years ago

Yeah I think that's fair. It's really a short list. I know the babel folks had some reasons for breaking with the pack on the tree shape, but I wasn't in any way involved with those discussions.