A web tool to explore the ASTs generated by various parsers.
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 theParsersrc/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 installRun yarn run build for the final minimized version.
Run yarn run watch for incremental builds.
Run yarn start to start a simple static webserver.
[Feature] Highlight matching closing bracket / symbol (parentheses, brackets, braces)
Support for Kotlin language
meriyah update needed
Is the project still maintained/supported?
the pr to update the syn for Rust parser, but it has not been merged
[feat]: add support to OXC as js parser
Would you be interested in add ts-morph for Typescript/Js ?
Add support for typespec
Feature request: dark mode
Feature Request: add Graph view in astexplorer