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 { let Divide {
destination, destination,
left, left,
left_type, left_type: _,
right, right,
right_type, right_type: _,
} = self; } = self;
write!( write!(f, "R{destination} = {left} ÷ {right}",)
f,
"R{destination} = {left_type}({left}) ÷ {right_type}({right})",
)
} }
} }

View File

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

View File

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

View File

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

View File

@ -46,9 +46,9 @@ impl Display for Negate {
let Negate { let Negate {
destination, destination,
argument, argument,
argument_type, ..
} = self; } = 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 { let Subtract {
destination, destination,
left, left,
left_type, left_type: _,
right, right,
right_type, right_type: _,
} = self; } = self;
write!( write!(f, "R{destination} = {left} - {right}",)
f,
"R{destination} = {left_type}({left}) - {right_type}({right})",
)
} }
} }