summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-16 19:24:02 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-16 19:24:02 -0400
commita48fdca56dfb7cab319789fb51b2d8959cf04c84 (patch)
treefdf19c1debd02dbd8cbdfde6e2b434736c29c9c2 /types.h
parent81e79161151912c86c6892bf8d4349360826c971 (diff)
sizeof, alignof
Diffstat (limited to 'types.h')
-rw-r--r--types.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/types.h b/types.h
index 9c6545f..40165f5 100644
--- a/types.h
+++ b/types.h
@@ -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 {