pub struct Printer<'a> { /* private fields */ }Expand description
A tree being written out as C.
Implementations§
Source§impl<'a> Printer<'a>
impl<'a> Printer<'a>
Sourcepub fn new(ast: &'a Ast, names: &'a Interner) -> Printer<'a>
pub fn new(ast: &'a Ast, names: &'a Interner) -> Printer<'a>
A printer over one tree, whose names are in names.
Sourcepub fn expr(&mut self, id: ExprId)
pub fn expr(&mut self, id: ExprId)
One expression, with no parentheses around it that the grammar does not need.
Sourcepub fn type_name(&mut self, id: TypeNameId)
pub fn type_name(&mut self, id: TypeNameId)
One type name, as it would be written in a cast.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Printer<'a>
impl<'a> RefUnwindSafe for Printer<'a>
impl<'a> Send for Printer<'a>
impl<'a> Sync for Printer<'a>
impl<'a> Unpin for Printer<'a>
impl<'a> UnsafeUnpin for Printer<'a>
impl<'a> UnwindSafe for Printer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more