This commit is contained in:
nora 2023-05-23 17:09:08 +02:00
parent 542c0daf6a
commit 86b924f5e3
7 changed files with 171 additions and 67 deletions

View file

@ -23,6 +23,8 @@ pub enum Atom {
#[derive(Debug, DebugPls)]
pub enum UnaryOp {
Increment,
Decrement,
AddrOf,
Deref,
Plus,

View file

@ -376,6 +376,8 @@ impl<W: Write> PrettyPrinter<W> {
fn unary(&mut self, unary: &ExprUnary) -> Result {
self.string(match unary.op {
UnaryOp::Increment => "++",
UnaryOp::Decrement => "--",
UnaryOp::AddrOf => "&",
UnaryOp::Deref => "*",
UnaryOp::Plus => "+",