Pretty print literals partially

This commit is contained in:
Joscha 2022-11-20 22:22:32 +01:00
parent 03e7f10739
commit 4156006ada
3 changed files with 19 additions and 1 deletions

View file

@ -5,7 +5,7 @@ use crate::ast::Expr;
impl<'a, D: DocAllocator<'a>> Pretty<'a, D> for Expr {
fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D> {
match self {
Self::Lit(lit) => allocator.text("<lit>"),
Self::Lit(lit) => lit.pretty(allocator),
Self::Call(call) => allocator.text("<call>"),
Self::Field(field) => allocator.text("<field>"),
Self::Var(var) => allocator.text("<var>"),