Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukehorvat/github-ast-viewer
Chrome extension to view the abstract syntax tree (AST) of code on GitHub.
https://github.com/lukehorvat/github-ast-viewer
abstract-syntax-tree ast chrome-extension github
Last synced: 7 days ago
JSON representation
Chrome extension to view the abstract syntax tree (AST) of code on GitHub.
- Host: GitHub
- URL: https://github.com/lukehorvat/github-ast-viewer
- Owner: lukehorvat
- License: mit
- Archived: true
- Created: 2015-04-26T05:34:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-06T21:49:37.000Z (8 months ago)
- Last Synced: 2024-08-02T16:48:38.777Z (3 months ago)
- Topics: abstract-syntax-tree, ast, chrome-extension, github
- Language: JavaScript
- Homepage: https://chrome.google.com/webstore/detail/github-ast-viewer/kgncjlmmhhmhbiiacajdmpnhplahelkh
- Size: 48.8 KB
- Stars: 73
- Watchers: 8
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub AST Viewer [![Version](https://img.shields.io/github/release/lukehorvat/github-ast-viewer.svg?style=flat-square)](https://github.com/lukehorvat/github-ast-viewer/releases)
Google Chrome extension for viewing the abstract syntax tree (AST) of code on GitHub.
Currently only JavaScript code is supported, but more language support to come in the future!
## Installation
Install the extension from the Google Chrome Web Store:
https://chrome.google.com/webstore/detail/github-ast-viewer/kgncjlmmhhmhbiiacajdmpnhplahelkh
## Usage
The extension adds an **AST** button to the GitHub page of any file in a repository. Clicking it will display the abstract syntax tree representation of the code. Demonstration:
![Screenshot](http://i.imgur.com/jumGRMd.gif)
## Contributing
All contributions are welcome.
After cloning the repository using Git, execute `npm install` to fetch the dependencies, and `npm start` to auto-build the extension while you work. Once you've committed your changes, just open a pull request on GitHub.
In particular, a few things I'd like help with:
- Adding support for more programming languages. This isn't easy, because all parsing has to be done in the web browser via JavaScript, which drastically reduces our choice of parsers. So if you know of any robust JavaScript-based parsers for other languages (that are as good as [Esprima](https://github.com/jquery/esprima)), let me know.
- Implementing handling of GitHub Gists.
- Investigating feasibility of AST *editing* via the GitHub interface. [Woah](http://i.imgur.com/dOr884t.gif).## Disclaimer
The extension is not officially affiliated with GitHub in any way. Use at own risk.