rust-playground icon indicating copy to clipboard operation
rust-playground copied to clipboard

Allow pretty printing the AST/HIR

Open Centril opened this issue 6 years ago • 5 comments

It would be really neat if there was an option to dump the AST and HIR representations of programs alongside the option to dump the MIR representation. This would be invaluable when working on the compiler.

Centril avatar Jun 13 '19 00:06 Centril

cc https://github.com/integer32llc/rust-playground/issues/371

Centril avatar Jun 13 '19 00:06 Centril

Note: I think the command to use for printing the HIR would be either -Z unpretty=hir (a source-like representation) or -Z unpretty=hir-tree (more like Debug output).

camelid avatar Nov 14 '20 03:11 camelid

I'm interested in working on this. I'll try to get around to it this weekend.

jyn514 avatar Feb 18 '21 16:02 jyn514

Note that pretty-printing the AST will probably have to wait until @LeSeulArtichaut implements -Z unpretty=ast.

camelid avatar Feb 18 '21 17:02 camelid