JS AST specs: estree [0] and babel's AST [1]
Parsers: babel [2], acorn [3], or espree [4]
Transformers: babel, recast [5], or jscodeshift [6]
Codegen: babel or escodegen [7]
[0] https://github.com/estree/estree
[1] https://babeljs.io/docs/en/babel-parser#output
[2] https://github.com/babel/babel
[3] https://github.com/acornjs/acorn
[4] https://github.com/eslint/espree
[5] https://github.com/benjamn/recast
But committing unreadable JSON files to version control rather defeats most of the features of version control.
Another example: Go has a parser and AST that comes with the standard library, which again is just using regular Go data structures (structs and interfaces). If you wanted to write a macro preprocessor, using the built-in parser seems like a much better idea than string manipulation.
So, I'm wondering if there's anything more to the way Common Lisp does it?
[1] http://esprima.org/ [2] https://github.com/estree/estree [3] http://esprima.org/demo/parse.html
JSCS (https://github.com/jscs-dev/node-jscs) (now merged with ESLint) started a CST project as well https://github.com/cst/cst to help deal with autoformatting by adding whitespace type nodes.
Currently the community has a lot of interest in https://github.com/jlongster/prettier which just simply reprints the file from scratch in a consistent way (posted in https://news.ycombinator.com/item?id=13365470).
We also have https://github.com/benjamn/recast to help source to source transformations and https://github.com/facebook/jscodeshift.
Yeah there's multiple JavaScript parsers: esprima, acorn, shift, babylon (uglify has their own parser I think).
There was an effort to standardize as well in https://github.com/estree/estree.
EDIT:
However, in Babel 6 there were a few (nice) incompatible changes to the AST which was unfortunate for interop and other tools (https://github.com/babel/babel-eslint had to make a lot of changes).
I don't want to speak for him, but I think a lot of the decisions to fork (parser, etc) at the time were most likely made like mentioned above to move faster. And at the time, Sebastian was basically the only one working on it. Maybe more context from his post: https://medium.com/@sebmck/2015-in-review-51ac7035e272#.qcyz...
Then you can traverse it and modify it like any other AST.
[1] https://github.com/ternjs/acorn [2] http://esprima.org/ [3] https://github.com/estree/estree
JavaScript has https://github.com/estree/estree for example. I've written a (very experimental) S-expression syntax for JavaScript around it here https://github.com/anko/eslisp