X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcalc.h;h=49114efc67b3a60f2997e8de36ff7485a24e5e3e;hp=58bab5d090603f36d34747918dd49478b07859de;hb=52ed5940ed0ab3cafd36fbded2e83c92563e7b2b;hpb=7df12c88a4e14611a2585d6e7c994c59e8d7485a diff --git a/src/calc.h b/src/calc.h index 58bab5d..49114ef 100644 --- a/src/calc.h +++ b/src/calc.h @@ -27,23 +27,19 @@ #define PSI_CALC_H #include "token.h" -#include "impl_val.h" +#include "types/impl_val.h" #define PRIfval "f" #define PRIdval "lf" #define PRIldval "Lf" -token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); +typedef token_t (*psi_calc)(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_lshift(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_rshift(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_and(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_xor(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_or(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); - -void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_type, impl_val *out_val); +#include "calc/basic.h" +#include "calc/bin.h" +#include "calc/bool.h" +#include "calc/cast.h" +#include "calc/cmp.h" +#include "calc/oper.h" #endif