summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/types.h b/types.h
index d1c5bf5..2358f45 100644
--- a/types.h
+++ b/types.h
@@ -138,6 +138,8 @@ typedef enum {
typedef enum {
DIRECT_C,
+ DIRECT_SIZEOF,
+ DIRECT_ALIGNOF,
DIRECT_COUNT
} Directive;
@@ -337,7 +339,9 @@ typedef enum {
EXPR_CALL,
EXPR_BLOCK,
EXPR_TUPLE,
- EXPR_DIRECT,
+ EXPR_C,
+ EXPR_DSIZEOF,
+ EXPR_DALIGNOF,
EXPR_SLICE,
EXPR_TYPE
} ExprKind;
@@ -368,12 +372,6 @@ typedef enum {
} BinaryOp;
typedef struct {
- Directive which;
- struct Expression *args;
-} DirectExpr;
-
-
-typedef struct {
struct Expression *fn;
union {
struct Argument *args;
@@ -457,7 +455,15 @@ typedef struct Expression {
Field *field; /* for . only */
} binary;
CallExpr call;
- DirectExpr direct;
+ struct {
+ struct Expression *code;
+ } c;
+ struct {
+ struct Expression *of;
+ } dsizeof; /* #sizeof directive */
+ struct {
+ struct Expression *of;
+ } dalignof; /* #alignof directive */
Identifier ident;
NewExpr new;
struct {