Dump the AST without converting to JSON #37873
Labels
A-frontend
Area: Compiler frontend (errors, parsing and HIR)
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
Like #10485, but using Rust's pretty-printed debug output (
{:#?}
) instead of a JSON encoding. This would be much easier for a human to read when trying to visualize how rustc interprets a particular syntax element (like I am right now). It could also be easily added to play.rust-lang.org as an additional output target, alongside the current ASM, LLVM IR, and MIR options. The output format wouldn't need to be stable or standardized, this would just be a debugging tool.I imagine this would entail two additional
-Z
options,ast
andast-noexpand
, to matchast-json
andast-json-noexpand
. Am up for preparing a PR if one would be welcomed, implementation appears straightforward at first glance.The text was updated successfully, but these errors were encountered: