Entity aliasing clean up

This commit is contained in:
gingerBill
2018-06-09 10:08:17 +01:00
parent d7108416c9
commit 49ea9ed722
9 changed files with 68 additions and 169 deletions

View File

@@ -12,7 +12,6 @@ struct DeclInfo;
ENTITY_KIND(Procedure) \
ENTITY_KIND(ProcGroup) \
ENTITY_KIND(Builtin) \
ENTITY_KIND(Alias) \
ENTITY_KIND(ImportName) \
ENTITY_KIND(LibraryName) \
ENTITY_KIND(Nil) \
@@ -119,9 +118,6 @@ struct Entity {
struct {
i32 id;
} Builtin;
struct {
Entity *base;
} Alias;
struct {
String path;
String name;
@@ -271,12 +267,6 @@ Entity *alloc_entity_builtin(Scope *scope, Token token, Type *type, i32 id) {
return entity;
}
Entity *alloc_entity_alias(Scope *scope, Token token, Type *type, Entity *base) {
Entity *entity = alloc_entity(Entity_Alias, scope, token, type);
entity->Alias.base = base;
return entity;
}
Entity *alloc_entity_import_name(Scope *scope, Token token, Type *type,
String path, String name, Scope *import_scope) {
Entity *entity = alloc_entity(Entity_ImportName, scope, token, type);