A web tool to explore the ASTs generated by various parsers.
Paste or drop code into the editor and inspect the generated AST on https://astexplorer.net/
The AST explorer provides following code parsers:
Depending on the parser settings, it not only supports ES5/CSS3 but also
Since future syntax is supported, the AST explorer is a useful tool for developers who want to create AST transforms. In fact, following transformers are included so you can prototype your own plugins:
$node
in the console to refer to the last opened/toggled AST
node.I'm happy about any feedback, feature request or PR to make this tool as useful as possible!
website/
.yarn add theParser
src/parsers/{language}
.loadParser
).parse
.nodeToRange
method (this is for highlighting).getNodeName
method (this is for quick look through the tree).opensByDefault
method for auto-expansion of specific properties._ignoredProperties
set or implement forEachProperty
generator method for filtering.renderSettings
method if applicable.website/
.src/parsers/{language}/transformers
.defaultParserID
.loadTransformer
).transform
.codeExample.txt
.IMPORTANT: For various reasons the project still requires Node.js version
16 (see .tools-versions
). If you use a tool like
asdf
switching versions will happen automatically.
website/
.yarn install
Run yarn run build
for the final minimized version.
Run yarn run watch
for incremental builds.
Run yarn start
to start a simple static webserver.