Skip to content

code-gen/show_ast

 
 

Repository files navigation

showast

Code style: black

An IPython/Jupyter notebook plugin for visualizing abstract syntax trees.

Added detailed info for nodes (see example below).

Example

See example.ipynb.

import showast
%%showast
x = self.func(1, 'test', var)

example

Installation

In the cloned repo directory, do

pip install .

showast has the following Python dependencies:

ipython
graphviz

You will also need to have Graphviz installed.

Use of the alternative nltk-based rendering engine requires the following packages:

nltk
pillow

When using this option, you will additionally need to have Ghostscript installed.

Credits

About

An IPython notebook plugin for visualizing ASTs.

Resources

License

Stars

Watchers

Forks

Languages

  • Jupyter Notebook 95.3%
  • Python 4.7%