Support divide operator in expressions

This commit is contained in:
Lauri Virtanen 2024-11-23 22:28:37 +02:00
parent aa4dd5c8e7
commit cafbf5499f
No known key found for this signature in database
GPG key ID: C04293ED964C2539
4 changed files with 132 additions and 1 deletions

View file

@ -46,6 +46,15 @@ pub fn insn_to_str(
0,
format!("r[{}]=r[{}]*r[{}]", dest, lhs, rhs),
),
Insn::Divide { lhs, rhs, dest } => (
"Divide",
*lhs as i32,
*rhs as i32,
*dest as i32,
OwnedValue::Text(Rc::new("".to_string())),
0,
format!("r[{}]=r[{}]/r[{}]", dest, lhs, rhs),
),
Insn::Null { dest, dest_end } => (
"Null",
0,