1
0

Roll back slightly

This commit is contained in:
Jeff 2025-02-03 18:08:03 -05:00
parent 93f8f31b6d
commit 12092c30f4
6 changed files with 17 additions and 32 deletions

View File

@ -56,14 +56,11 @@ impl Display for Divide {
let Divide {
destination,
left,
left_type,
left_type: _,
right,
right_type,
right_type: _,
} = self;
write!(
f,
"R{destination} = {left_type}({left}) ÷ {right_type}({right})",
)
write!(f, "R{destination} = {left} ÷ {right}",)
}
}

View File

@ -56,15 +56,12 @@ impl Display for Equal {
let Equal {
comparator,
left,
left_type,
left_type: _,
right,
right_type,
right_type: _,
} = self;
let operator = if *comparator { "==" } else { "" };
write!(
f,
"if {left}({left_type}) {operator} {right}({right_type}) {{ JUMP +1 }}"
)
write!(f, "if {left} {operator} {right} {{ JUMP +1 }}")
}
}

View File

@ -56,14 +56,11 @@ impl Display for Modulo {
let Modulo {
destination,
left,
left_type,
left_type: _,
right,
right_type,
right_type: _,
} = self;
write!(
f,
"R{destination} = {left_type}({left}) % {right_type}({right})",
)
write!(f, "R{destination} = {left} % {right}",)
}
}

View File

@ -56,14 +56,11 @@ impl Display for Multiply {
let Multiply {
destination,
left,
left_type,
left_type: _,
right,
right_type,
right_type: _,
} = self;
write!(
f,
"R{destination} = {left_type}({left}) ✕ {right_type}({right})",
)
write!(f, "R{destination} = {left} ✕ {right}",)
}
}

View File

@ -46,9 +46,9 @@ impl Display for Negate {
let Negate {
destination,
argument,
argument_type,
..
} = self;
write!(f, "R{destination} = -{argument_type}({argument})")
write!(f, "R{destination} = -{argument}")
}
}

View File

@ -56,14 +56,11 @@ impl Display for Subtract {
let Subtract {
destination,
left,
left_type,
left_type: _,
right,
right_type,
right_type: _,
} = self;
write!(
f,
"R{destination} = {left_type}({left}) - {right_type}({right})",
)
write!(f, "R{destination} = {left} - {right}",)
}
}