diff options
| author | gingerBill <ginger.bill.22@gmail.com> | 2016-07-30 00:09:30 +0100 |
|---|---|---|
| committer | gingerBill <ginger.bill.22@gmail.com> | 2016-07-30 00:17:13 +0100 |
| commit | 776dc0e8f1aa506ae0096c78ff10565e56c175e7 (patch) | |
| tree | 946508a869196a3bf1d005e0ddffd182a1786a1d /src/checker/entity.cpp | |
| parent | 32ab8fcf99df786c264ca566799b022c66cca34b (diff) | |
Restart LLVM IR SSA generation
This is the third go and I'm going for it!
Diffstat (limited to 'src/checker/entity.cpp')
| -rw-r--r-- | src/checker/entity.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp index 0553f8a50..6a562ecf0 100644 --- a/src/checker/entity.cpp +++ b/src/checker/entity.cpp @@ -2,19 +2,30 @@ struct Scope; struct Checker; enum BuiltinProcedureId; -enum EntityKind { - Entity_Invalid, +#define ENTITY_KINDS \ + ENTITY_KIND(Invalid), \ + ENTITY_KIND(Constant), \ + ENTITY_KIND(Variable), \ + ENTITY_KIND(TypeName), \ + ENTITY_KIND(AliasName), \ + ENTITY_KIND(Procedure), \ + ENTITY_KIND(Builtin), \ + ENTITY_KIND(Count), - Entity_Constant, - Entity_Variable, - Entity_TypeName, - Entity_AliasName, - Entity_Procedure, - Entity_Builtin, - Entity_Count, +enum EntityKind { +#define ENTITY_KIND(k) GB_JOIN2(Entity_, k) + ENTITY_KINDS +#undef ENTITY_KIND }; +String const entity_strings[] = { +#define ENTITY_KIND(k) {cast(u8 *)#k, gb_size_of(#k)-1} + ENTITY_KINDS +#undef ENTITY_KIND +}; + + typedef i64 EntityGuid; struct Entity { |