diff options
Diffstat (limited to 'include/expr.h')
-rw-r--r-- | include/expr.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/expr.h b/include/expr.h index 9d4d50a..a0242bb 100644 --- a/include/expr.h +++ b/include/expr.h @@ -11,6 +11,8 @@ enum valuekind { }; struct value_e { + struct location loc; + enum valuekind kind; union { struct literal lit; @@ -19,6 +21,8 @@ struct value_e { }; struct grp_e { + struct location loc; + int isgrouped; union { struct expr *grouped; @@ -27,6 +31,8 @@ struct grp_e { }; struct call_e { + struct location loc; + struct expr *args; int argsz, arglen; }; @@ -39,6 +45,8 @@ enum access { }; struct access_e { + struct location loc; + struct grp_e grp; enum access kind; union { @@ -50,6 +58,8 @@ struct access_e { }; struct tag_e { + struct location loc; + int dotagof; struct access_e access; }; @@ -61,6 +71,8 @@ enum signop { }; struct sign_e { + struct location loc; + enum signop op; struct tag_e tag; }; @@ -72,6 +84,8 @@ enum invop { }; struct inv_e { + struct location loc; + enum invop op; union { struct inv_e *inv; @@ -80,6 +94,8 @@ struct inv_e { }; struct deref_e { + struct location loc; + int doderef; union { struct deref_e *deref; @@ -88,26 +104,36 @@ struct deref_e { }; struct ref_e { + struct location loc; + int doref; struct deref_e inner; }; struct as_e { + struct location loc; + struct ref_e lhs; struct type *cast; }; struct bitand_e { + struct location loc; + struct as_e lhs; struct bitand_e *rhs; }; struct bitxor_e { + struct location loc; + struct bitand_e lhs; struct bitxor_e *rhs; }; struct bitor_e { + struct location loc; + struct bitxor_e lhs; struct bitor_e *rhs; }; @@ -120,6 +146,8 @@ enum productop { }; struct product_e { + struct location loc; + struct bitor_e lhs; enum productop op; struct product_e *rhs; @@ -132,6 +160,8 @@ enum sumop { }; struct sum_e { + struct location loc; + struct product_e lhs; enum sumop op; struct sum_e *rhs; @@ -144,6 +174,8 @@ enum shiftop { }; struct shift_e { + struct location loc; + struct sum_e lhs; enum shiftop op; struct shift_e *rhs; @@ -160,17 +192,23 @@ enum cmpop { }; struct cmp_e { + struct location loc; + struct shift_e lhs; enum cmpop op; struct shift_e *rhs; }; struct conjunction_e { + struct location loc; + struct cmp_e lhs; struct conjunction_e *rhs; }; struct expr { + struct location loc; + struct conjunction_e lhs; struct expr *rhs; }; |