From a77c6b3e55c5857c9c0ba36baae2dbdcd7564cd4 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Wed, 23 Nov 2016 12:25:37 +0000 Subject: Compile as C! Whoop! --- src/checker/entity.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/checker/entity.cpp') 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) { -- cgit v1.2.3