diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-27 11:03:46 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-27 11:03:46 +0100 |
| commit | 6aae381e83dddf8808feefe4a5a2470320f27342 (patch) | |
| tree | 4b83602375cb42f89d68c89c60bd1389df93369a /src/entity.cpp | |
| parent | 7ee9051a56ca0c04e6b60f53b9dfe47c75596496 (diff) | |
Move ODIN_* platform constants to `core:os`
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index d7f7dc2df..31081e5ce 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -6,7 +6,6 @@ struct DeclInfo; #define ENTITY_KINDS \ ENTITY_KIND(Invalid) \ - ENTITY_KIND(Package) \ ENTITY_KIND(Constant) \ ENTITY_KIND(Variable) \ ENTITY_KIND(TypeName) \ @@ -77,6 +76,7 @@ struct Entity { AstNode * identifier; // Can be nullptr DeclInfo * decl_info; DeclInfo * parent_proc_decl; // nullptr if in file/global scope + AstPackage *package; // TODO(bill): Cleanup how `using` works for entities Entity * using_parent; @@ -87,12 +87,6 @@ struct Entity { union { struct { - String fullpath; - String name; - Scope *scope; - // Array<Entity *> imports; // Entity_Package - } Package; - struct { ExactValue value; } Constant; struct { @@ -196,15 +190,6 @@ Entity *alloc_entity(EntityKind kind, Scope *scope, Token token, Type *type) { return entity; } -Entity *alloc_entity_package(Scope *scope, Type *type, String fullpath, String name) { - Token token = empty_token; - token.string = name; - Entity *entity = alloc_entity(Entity_Package, scope, token, type); - entity->Package.fullpath = fullpath; - entity->Package.name = name; - return entity; -} - Entity *alloc_entity_variable(Scope *scope, Token token, Type *type, bool is_immutable, EntityState state = EntityState_Unresolved) { Entity *entity = alloc_entity(Entity_Variable, scope, token, type); entity->Variable.is_immutable = is_immutable; |