onehr / crust

C99 compiler toolchain in Rust (for fun and self-education)
Apache License 2.0
173 stars 15 forks source link

Better AST Printer #22

Open onehr opened 5 years ago

onehr commented 5 years ago

Now crust just use a simple AST Printer, which uses the depth as its parameter to control its indention level, but should be improved by ignoring some node information which are not useful for us to observe (cause it can be overwhelming sometimes) , but also keeps its scope level.

onehr commented 5 years ago

Maybe try to generate CFG from AST node to better visualize the structures of the AST.

https://doc.rust-lang.org/1.0.0/graphviz/index.html