diff options
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -253,9 +253,10 @@ typedef enum { DIRECT_COUNT } Directive; -static const char *directives[DIRECT_COUNT] = - {"C", "sizeof", "alignof", "export", "foreign", "builtin", "include", "force", "if", "error", "warn", - "info"}; +static const char *directives[DIRECT_COUNT] = { + "C", "sizeof", "alignof", "export", "foreign", "builtin", "include", "force", "if", "error", "warn", + "info" +}; typedef enum { KW_SEMICOLON, @@ -320,6 +321,7 @@ typedef enum { KW_TRUE, KW_FALSE, KW_NMS, + KW_USE, KW_TYPEOF, KW_SIZEOF, KW_ALIGNOF, @@ -336,8 +338,8 @@ static const char *const keywords[KW_COUNT] = { "continue", "defer", "fn", "as", "struct", "int", "i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "float", "f32", "f64", "Type", - "Namespace", - "char", "bool", "true", "false", "nms", "typeof", "sizeof", "alignof" + "Namespace", "char", "bool", "true", "false", "nms", "use", + "typeof", "sizeof", "alignof" }; typedef enum { @@ -915,7 +917,8 @@ typedef enum { STMT_CONT, STMT_INCLUDE, STMT_MESSAGE, - STMT_DEFER + STMT_DEFER, + STMT_USE } StatementKind; enum { @@ -981,6 +984,7 @@ typedef struct Statement { Message message; /* #error, #warn, #info */ Block *referring_to; /* for break/continue; set during typing */ struct Statement *defer; + Expression use; }; } Statement; |