Pretty print table literals

This commit is contained in:
Joscha 2022-11-20 23:33:39 +01:00
parent f91e8ac9a2
commit 412eaffc07
3 changed files with 48 additions and 4 deletions

View file

@ -1,6 +1,12 @@
use pretty::{DocAllocator, DocBuilder};
use pretty::{DocAllocator, DocBuilder, Pretty};
use crate::ast::Separated;
use crate::ast::{Ident, Separated};
impl<'a, D: DocAllocator<'a>> Pretty<'a, D> for Ident {
fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D> {
allocator.text(self.name)
}
}
impl<E, S1, S2> Separated<E, S1, S2> {
pub fn pretty<'a, D, FE, FS1, FS2>(