diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-03-12 16:42:51 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-03-12 16:42:51 +0000 |
| commit | aaec8bf423a40f887d43d12403c2e40f187d424c (patch) | |
| tree | 98958a8c7db53197a0176fcc7607bdcad0a4d8c3 /src/entity.c | |
| parent | 0fcbda951aea462248304a7e16f5c4eb9da9939d (diff) | |
windows.odin TYPE_NAME to Type_Name; More SSA work and SSA printing for debugging
Diffstat (limited to 'src/entity.c')
| -rw-r--r-- | src/entity.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/entity.c b/src/entity.c index 32d070953..446edfa54 100644 --- a/src/entity.c +++ b/src/entity.c @@ -13,6 +13,7 @@ typedef struct Type Type; ENTITY_KIND(Builtin) \ ENTITY_KIND(ImportName) \ ENTITY_KIND(LibraryName) \ + ENTITY_KIND(Alias) \ ENTITY_KIND(Nil) \ ENTITY_KIND(Count) @@ -95,6 +96,9 @@ struct Entity { String name; bool used; } LibraryName; + struct { + Entity *original; + } Alias; i32 Nil; }; }; @@ -218,6 +222,13 @@ Entity *make_entity_library_name(gbAllocator a, Scope *scope, Token token, Type return entity; } +Entity *make_entity_alias(gbAllocator a, Scope *scope, Token token, Type *type, + Entity *original) { + Entity *entity = alloc_entity(a, Entity_Alias, scope, token, type); + entity->Alias.original = original; + return entity; +} + Entity *make_entity_nil(gbAllocator a, String name, Type *type) { Token token = make_token_ident(name); Entity *entity = alloc_entity(a, Entity_Nil, NULL, token, type); |