interpreter: Add float machinery

- operators
- type casting
This commit is contained in:
2024-09-18 01:02:09 -05:00
parent 0f8b0824ac
commit fad28beb05
3 changed files with 18 additions and 2 deletions

View File

@@ -223,6 +223,7 @@ builtins! {
Ok(match tail {
ConValue::Empty => ConValue::Empty,
ConValue::Int(v) => ConValue::Int(v.wrapping_neg()),
ConValue::Float(v) => ConValue::Float(-v),
_ => Err(Error::TypeError)?,
})
}