AST Visualisation
See original GitHub issueIt’d be great to be able to visualise the result of parsing – the AST. This could be triggered with a new CLI command, e.g. teal ast file.tl
.
One approach: generate some graphviz based on the Node structure. See parser.py and nodes.py. Depends on the user having graphviz installed, so maybe a pure-python approach would be better!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AST Visualization on browser - NISHIO Hirokazu
AST Visualization on browser¶. Realtime JavaScript Abstract Syntax Tree Visualisation. Demo¶. Code Input. 1 + 2 * 3 ...
Read more >JavaScript AST visualizer - JointJS
Show AST to SVG to PNG. Program VariableDeclarat ion VariableDeclarat or a 42 VariableDeclarat ion VariableDeclarat or b 5 function addA(d) BlockStatement ...
Read more >16 Using Graphviz/dot to visualize our AST
16.1 Visualizing ASTs. Abstract Syntax Trees (ASTs) are a useful abstraction when dealing with programming languages as an object for analysis or ...
Read more >ROSE Compiler Framework/How to visualize AST - Wikibooks
1 Overview · 2 Sample input code · 3 Dot Graph Generator · 4 Dot Graph Visualization · 5 Example session · 6...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll work on this, but I’ll use graphviz (pydot package) due to lack of alternatives.
Ah, and I missed your question about
list
vsAny
. You’re right, it looks like they’re wrong type annotations. Created #20 for it. Thanks!