summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/types.h b/types.h
index 5540d16..1734393 100644
--- a/types.h
+++ b/types.h
@@ -316,6 +316,7 @@ typedef enum {
KW_TRUE,
KW_FALSE,
KW_NMS,
+ KW_TYPEOF,
KW_COUNT
} Keyword;
@@ -330,7 +331,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"};
+ "char", "bool", "true", "false", "nms", "typeof"};
typedef enum {
NUM_LITERAL_INT,
@@ -566,6 +567,7 @@ typedef enum {
UNARY_DEREF, /* *x */
UNARY_NOT, /* !x */
UNARY_DEL, /* del x */
+ UNARY_TYPEOF, /* typeof x */
UNARY_LEN, /* x.len ; replaces BINARY_DOT len when typing */
UNARY_DSIZEOF,
UNARY_DALIGNOF