aboutsummaryrefslogtreecommitdiff
path: root/src/checker/entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/checker/entity.cpp')
-rw-r--r--src/checker/entity.cpp29
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 {