1
Fork 0

Add some comments.

This commit is contained in:
Nicholas Nethercote 2023-11-14 14:00:25 +11:00
parent 10c8b56af1
commit 9fe6bb4a10
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,7 @@
//! AST pretty printing.
//!
//! Note that HIR pretty printing is layered on top of this crate.
mod expr;
mod item;
@ -256,6 +260,7 @@ impl std::ops::DerefMut for State<'_> {
}
}
/// This trait is used for both AST and HIR pretty-printing.
pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::DerefMut {
fn comments(&mut self) -> &mut Option<Comments<'a>>;
fn ann_post(&mut self, ident: Ident);