https://github.com/irahorecka/astree
Visualize abstract syntax trees of methods, declarations, expressions, and more
https://github.com/irahorecka/astree
abstract-syntax-tree astree graphviz-dot pydot syntax-trees
Last synced: 3 months ago
JSON representation
Visualize abstract syntax trees of methods, declarations, expressions, and more
- Host: GitHub
- URL: https://github.com/irahorecka/astree
- Owner: irahorecka
- License: mit
- Created: 2020-04-08T04:19:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-26T02:44:18.000Z (over 2 years ago)
- Last Synced: 2023-07-26T03:42:09.334Z (over 2 years ago)
- Topics: abstract-syntax-tree, astree, graphviz-dot, pydot, syntax-trees
- Language: Python
- Homepage:
- Size: 14.4 MB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# astree
### Visualize abstract syntax trees of methods, declarations, expressions, and more
```astree.py``` combines the Python ```ast``` module with
```pydot_ng``` to draw abstract syntax trees specified in DOT language scripts.
An abstract syntax tree is a tree representation of the abstract
syntactic structure of source code written in a programming language (e.g. Python).
Jumpstart -- running the program:
1) Clone repository
2) ```$ pip install -r requirements.txt```
3) ```$ python astree.py```
Input modules, methods, declarations, statements, expressions, etc.
View video example here.
For example, let's look at the ```requests.get``` method:
```>>> Input a method name, expression, etc.:```
```requests.get```

Note: please report bugs to issues.