astgen

Generate Abstract Syntax Tree (AST) in JSON format for JavaScript/TypeScript

brewmacoslinux
Try with needOr install directly
Source

About

Generate AST in json format for JS/TS

Commands

astgen

Examples

Generate AST for a JavaScript file$ astgen input.js
Generate AST for a TypeScript file and save to output$ astgen input.ts > ast.json
Generate AST with specific parser options$ astgen --parser typescript input.ts