Acorn

(This is a temporary placeholder project page. Better is to come in the future.)

Acorn is a tiny, fast JavaScript parser written in JavaScript. If defines acorn.parse, which, when given a string and an optional options argument, will spit out an abstract syntax tree.

The output conforms largely to the Mozilla parser API with the caveat that non-ECMAscript features (let, yield, inline XML, etc) are not supported, and that node start/end information is attached directly to the nodes themselves, rather than wrapped in another object and attached as a loc property.

See acorn.defaultOptions for the kind of options that the parser supports.

Get the code and report bugs on the Github page.