https://github.com/cognominal/ts-ast-explorer
vscode extension with a treeview to explore typescript ASTs (ongoing work)
https://github.com/cognominal/ts-ast-explorer
ast extension extension-vscode javascript json treeview typescript vscode
Last synced: 2 months ago
JSON representation
vscode extension with a treeview to explore typescript ASTs (ongoing work)
- Host: GitHub
- URL: https://github.com/cognominal/ts-ast-explorer
- Owner: cognominal
- Created: 2023-11-18T02:22:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-07T01:50:00.000Z (almost 2 years ago)
- Last Synced: 2025-04-10T01:16:40.408Z (about 1 year ago)
- Topics: ast, extension, extension-vscode, javascript, json, treeview, typescript, vscode
- Language: TypeScript
- Homepage:
- Size: 830 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# README.md
## Features
This vscode extension is an [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) explorer that handles
file formats supported by the [typescript compiler](https://github.com/microsoft/TypeScript).
The said formats are typescript, javascript, jsx, tsx.
When the current editor is in one of this format, use the
command `view: show AST explorer` in the palette to display the
AST explor
The said explorer displays two treeviews :
* `AST explorer` displays the AST tree nodes in a concise format. For keywords, it displays the keyword itself. For other tokens it displays [syntaxkind](https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L39)
* `TS AST Branch` (not implemented) will
display more detailed information the branch that starts at the selected node
and ends at the root of the AST (currently display only the root node).
## Features TBD
Clicking in any of the current editor view , or the two treeview will update the other two views.
## TS AST Branch
Each node will contain tabular data about the branch.
Each node of the branch being tabular data
So that implies some sort of webview but there is no API in
vscode so a third party module must be involed.
## randome stuff
for the README generated by yo code see [yo-README.md](yo-README.md). It
contains stuff true of all extensions generated by `yo code`.
[vsc-extension-quickstart.md](vsc-extension-quickstart.md) contains information
about developping and debugging the extension. I will probably delete the
formet and keep the latter for potential contributors.
A config option `updateASTOnSaveOnly` : either allows to update the AST of the
current document on save, or do it continuously as the file is edited.