So, I am working on a language, and I wanted, mainly out of curiosity, to see if I could visualize the abstract syntax tree of the file. After some inspection, I found the graphviz point, converted my pretty AST instance to be able to output to this format:
digraph G { main -> parse -> execute; main -> init; main -> cleanup; execute -> make_string; execute -> printf init -> make_string; main -> printf; execute -> compare; }
But my problem is that on startup
dot -Tpng dotf.gv -o graph.png
In the input file, I get a file with a width of 8000 pixels, which is just not practical. See here .
I do not know if it can be fixed, but if someone can be grateful.
source share