Golang style enumerations with iota

This commit is contained in:
Ginger Bill
2016-12-19 13:18:20 +00:00
parent f5eeecaca5
commit ac1566762b
6 changed files with 151 additions and 97 deletions
+4
View File
@@ -83,6 +83,10 @@ struct Entity {
};
};
Entity *e_iota = NULL;
Entity *alloc_entity(gbAllocator a, EntityKind kind, Scope *scope, Token token, Type *type) {
Entity *entity = gb_alloc_item(a, Entity);
entity->kind = kind;