reid-llvm/examples/custom_binop.reid
2025-07-24 13:07:49 +03:00

13 lines
214 B
Plaintext

// Arithmetic, function calls and imports!
impl binop (lhs: u16) + (rhs: u32) -> u32 {
return (lhs as u32) + rhs;
}
fn main() -> u32 {
let value = 6;
let other = 15;
return value * other + 7 * -value;
}