diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-14 20:44:26 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-14 20:44:26 +0300 |
| commit | 2023a7b2d9656f80b00de81453348c0a66f200f7 (patch) | |
| tree | 06e4ea293318955cc4cf620428d04f1708c17364 /include | |
| parent | 1a56a881bc2c37614cfd074e7b986211c6d04809 (diff) | |
| download | ek-2023a7b2d9656f80b00de81453348c0a66f200f7.tar.gz ek-2023a7b2d9656f80b00de81453348c0a66f200f7.zip | |
test cleanup
+ Somewhat poor Git hygiene but I also fixed some bugs while I was at
it.
Diffstat (limited to 'include')
| -rw-r--r-- | include/ek/ast.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ek/ast.h b/include/ek/ast.h index 3d839ad..53bc8d6 100644 --- a/include/ek/ast.h +++ b/include/ek/ast.h @@ -158,6 +158,7 @@ enum ast_kind { AST_CONST_CHAR, AST_CONST_BOOL, AST_CONST_STR, + AST_UNPACK, }; /** Flags an AST node can have. */ @@ -275,6 +276,9 @@ size_t type_offsetof(struct type *t, char *m); #define tgen_trait(id, def, loc) \ tgen_type(TYPE_TRAIT, NULL, NULL, def, NULL, id, loc) +#define tgen_enum(id, def, loc) \ + tgen_type(TYPE_ENUM, NULL, NULL, def, NULL, id, loc) + static inline bool is_binop(struct ast *x) { switch (x->k) { @@ -625,6 +629,9 @@ static inline bool is_primitive(struct type *t) #define gen_id(id, loc) \ gen_str(AST_ID, id, loc) +#define gen_unpack(id, loc) \ + gen_str(AST_UNPACK, id, loc) + #define gen_empty(loc) \ gen1(AST_EMPTY, NULL, loc) |
