No description
Find a file
2022-09-18 14:46:57 -07:00
src fix parents not being popped, 2022-01-17 19:45:03 -07:00
.gitignore add gitignore 2022-01-15 15:12:42 -07:00
astdot.nimble remove strings 2022-09-18 14:46:57 -07:00
example.jpg fix parents not being popped, 2022-01-17 19:45:03 -07:00
README.md shamelessly plug oak 2022-01-15 16:10:11 -07:00

Astdot

Print a dot graph of a nim ast dumped using the dumpTree macro.

example tree

The theme used is currently hardcoded with colors from my syntax theme oak.

Note: node names are hardcoded, and many are missing colors.


View image

To view output in fim: astdot | dot -Tjpg | fim -i --autowindow

Feed output from dumpTree

Force recompile (to reprint macros) and pipe into astdot: nim r -f src/example.nim | astdot

Pipe clipboard

With xclip to paste from clipboard: xclip -selection clipboard -o | astdot