diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/expr.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/expr.h b/include/expr.h index 93b9204..8b4d8b0 100644 --- a/include/expr.h +++ b/include/expr.h @@ -4,10 +4,6 @@ #include "lex.h" #include "type.h" -struct grouping_e { - struct disjunction_e *inner; -}; - struct number_e { struct number value; struct type type; @@ -30,7 +26,7 @@ struct literal_e { enum literal kind; union { bool b; - const char *str; + char *str; struct number_e num; struct array_e arr; } lit; @@ -57,7 +53,7 @@ enum primary { struct primary_e { enum primary kind; union { - struct grouping_e grp; + struct disjunction_e *grp; struct literal_e lit; struct call_e call; struct path path; @@ -65,6 +61,7 @@ struct primary_e { }; enum unary_postfix { + UPS_NONE, UPS_DEREF, UPS_TRY, UPS_ASSERT, @@ -76,9 +73,10 @@ struct unarypost_e { }; enum unary_prefix { - UPR_NUMNEG, - UPR_BOOLNEG, - UPR_BITNEG, + UPR_NONE, + UPR_NEG, + UPR_INVERT, + UPR_BNEG, }; struct unarypre_e { @@ -142,7 +140,7 @@ enum term { struct term_e { enum term term; - struct num_e lhs, rhs; + struct num_e lhs, *rhs; }; enum comparison { @@ -165,7 +163,7 @@ struct cmp_e { struct eq_e { bool invert; - struct cmp_e lhs, rhs; + struct cmp_e lhs, *rhs; }; enum boolean { |