Pretty print programs partially

This commit is contained in:
Joscha 2022-11-20 20:32:14 +01:00
parent 1b364061e4
commit 200b653e61
3 changed files with 28 additions and 17 deletions

View file

@ -1,9 +1 @@
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")
}
}
mod program;