An open API service indexing awesome lists of open source software.

https://github.com/salt-die/prettiest_ast

A pretty printer for python abstract syntax trees.
https://github.com/salt-die/prettiest_ast

abstract-syntax-tree pretty-printer syntax-trees

Last synced: 4 months ago
JSON representation

A pretty printer for python abstract syntax trees.

Awesome Lists containing this project

README

          

# prettiest_ast

A simple pretty printer for python abstract syntax trees:

```py
>>> from prettiest_ast import ppast
>>> ppast('for i in range(5): print(i)')

For
├──Name
│ ├──i
│ ╰──Store
├──Call
│ ├──Name
│ │ ├──range
│ │ ╰──Load
│ ╰──Constant
│ ╰──5
╰──Expr
╰──Call
├──Name
│ ├──print
│ ╰──Load
╰──Name
├──i
╰──Load
```