diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-16 19:24:02 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-16 19:24:02 -0400 |
commit | a48fdca56dfb7cab319789fb51b2d8959cf04c84 (patch) | |
tree | fdf19c1debd02dbd8cbdfde6e2b434736c29c9c2 /types.h | |
parent | 81e79161151912c86c6892bf8d4349360826c971 (diff) |
sizeof, alignof
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -323,6 +323,8 @@ typedef enum { KW_FALSE, KW_NMS, KW_TYPEOF, + KW_SIZEOF, + KW_ALIGNOF, KW_COUNT } Keyword; @@ -338,7 +340,7 @@ static const char *const keywords[KW_COUNT] = "int", "i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "float", "f32", "f64", "Type", "Namespace", - "char", "bool", "true", "false", "nms", "typeof"}; + "char", "bool", "true", "false", "nms", "typeof", "sizeof", "alignof"}; typedef enum { NUM_LITERAL_INT, @@ -581,7 +583,9 @@ typedef enum { UNARY_TYPEOF, /* typeof x */ UNARY_LEN, /* x.len ; replaces BINARY_DOT len when typing */ UNARY_DSIZEOF, - UNARY_DALIGNOF + UNARY_DALIGNOF, + UNARY_SIZEOF, + UNARY_ALIGNOF } UnaryOp; typedef enum { |