aboutsummaryrefslogtreecommitdiff
path: root/src/checker/entity.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-11-23 12:25:37 +0000
committerGinger Bill <bill@gingerbill.org>2016-11-23 12:25:37 +0000
commita77c6b3e55c5857c9c0ba36baae2dbdcd7564cd4 (patch)
treeb53241533f12e6f9075026a77860a9cc1dd5baa0 /src/checker/entity.cpp
parentef8563a818812493c33e34a259189757d0e7612b (diff)
Compile as C! Whoop!
Diffstat (limited to 'src/checker/entity.cpp')
-rw-r--r--src/checker/entity.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp
index 83ea1d782..98083e803 100644
--- a/src/checker/entity.cpp
+++ b/src/checker/entity.cpp
@@ -37,7 +37,8 @@ typedef enum EntityFlag {
EntityFlag_VectorElem = 1<<5,
} EntityFlag;
-typedef struct Entity {
+typedef struct Entity Entity;
+struct Entity {
EntityKind kind;
u32 flags;
Token token;
@@ -57,8 +58,8 @@ typedef struct Entity {
i32 field_index;
i32 field_src_index;
} Variable;
- struct {} TypeName;
- struct {} Procedure;
+ i32 TypeName;
+ i32 Procedure;
struct {
BuiltinProcId id;
} Builtin;
@@ -68,14 +69,14 @@ typedef struct Entity {
Scope *scope;
bool used;
} ImportName;
- struct {} Nil;
+ i32 Nil;
struct {
// TODO(bill): Should this be a user-level construct rather than compiler-level?
ImplicitValueId id;
Entity * backing;
} ImplicitValue;
};
-} Entity;
+};
bool is_entity_exported(Entity *e) {
if (e->kind == Entity_ImportName) {