Pretty print table literals
This commit is contained in:
parent
f91e8ac9a2
commit
412eaffc07
3 changed files with 48 additions and 4 deletions
|
|
@ -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>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue