dillon1000/react
Commit
Browse files [rust] Pretty-printer for HIR
Implements a pretty-printer for the HIR and switches the fixture tests to use this instead of the debug format. It's much more readable now! Note that not all types are properly printed, I only implemented the instructions and terminals used in the example. For others we fall back to the Debug impl so we at least print something.
Changed paths7 files
First-parent comparisoncompiler/forget/crates/fixtures/tests/fixtures/simple.js ModifiedM compiler/forget/crates/fixtures/tests/fixtures_test.rs ModifiedM compiler/forget/crates/fixtures/tests/snapshots/fixtures_test__fixtures.snap ModifiedM compiler/forget/crates/hir/src/id_types.rs ModifiedM compiler/forget/crates/hir/src/instruction.rs ModifiedM compiler/forget/crates/hir/src/lib.rs ModifiedA compiler/forget/crates/hir/src/print.rs AddedPatch
Files changed
Rendering syntax-highlighted changes…