X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Ftypes%2Fnum_exp.h;h=7ec62e1c02cffe5679853e05c457a2cac6704546;hb=cffcbdd1df9f6d5dcf78f49a3d1b44cefe21b2f5;hp=99f0b698d2e56c9228c4025c4f9b2d6bddfd106b;hpb=42f44eb5bf4ecd36e26e051fada79d861d0f92d2;p=m6w6%2Fext-psi diff --git a/src/types/num_exp.h b/src/types/num_exp.h index 99f0b69..7ec62e1 100644 --- a/src/types/num_exp.h +++ b/src/types/num_exp.h @@ -50,12 +50,20 @@ struct psi_num_exp { struct psi_decl_type *typ; struct psi_num_exp *num; } c; + struct { + struct psi_num_exp *cond; + struct psi_num_exp *truthy; + struct psi_num_exp *falsy; + } t; struct psi_num_exp *u; struct psi_number *n; } data; token_t (*calc)(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); }; +struct psi_num_exp *psi_num_exp_init_ternary(token_t op, + struct psi_num_exp *cond, struct psi_num_exp *truthy, + struct psi_num_exp *falsy); struct psi_num_exp *psi_num_exp_init_binary(token_t op, struct psi_num_exp *lhs, struct psi_num_exp *rhs); struct psi_num_exp *psi_num_exp_init_unary(token_t op,