You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
436 B

use super::*;
use blonkus_ma::nat_call;
macro_rules! nat_binop {
( $id:literal , $name:ident , $op:tt ) => {
#[nat_call($id, |Q64_0, Q64_0| -> Q64_0)]
fn $name(x: i64, y: i64) -> i64 {
x $op y
}
};
}
#[nat_call("dbgi", |Q64_0| -> Void)]
fn dbgi(n: i64) {
eprintln!("{}", n);
}
nat_binop!("i+", addi, +);
nat_binop!("i-", subi, -);
nat_binop!("i*", muli, *);
nat_binop!("i/", divi, /);
nat_binop!("i%", remi, %);
// EOF