Code Monkey home page Code Monkey logo

github-ast-viewer's Introduction

GitHub AST Viewer Version

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

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), let me know.
  • Implementing handling of GitHub Gists.
  • Investigating feasibility of AST editing via the GitHub interface. Woah.

Disclaimer

The extension is not officially affiliated with GitHub in any way. Use at own risk.

github-ast-viewer's People

Contributors

lukehorvat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-ast-viewer's Issues

Check out astexplorer.net

Hey, this project is really cool! You may want to take a look at astexplorer.net, it contains a lot of different ast parsers, transformers and display of the code that's already working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.