Add "pretty" subcommand
This commit is contained in:
parent
43d5b6d5ae
commit
407786b98c
4 changed files with 74 additions and 1 deletions
9
src/pretty.rs
Normal file
9
src/pretty.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use pretty::{DocAllocator, DocBuilder, Pretty};
|
||||
|
||||
use crate::ast::Program;
|
||||
|
||||
impl<'a, A: DocAllocator<'a>> Pretty<'a, A> for Program {
|
||||
fn pretty(self, allocator: &'a A) -> DocBuilder<'a, A, ()> {
|
||||
allocator.text("Hello world")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue