Untyped nil

This commit is contained in:
Ginger Bill
2016-10-06 17:11:17 +01:00
parent fee504636f
commit 50301557b2
28 changed files with 8078 additions and 8567 deletions
+9
View File
@@ -10,6 +10,7 @@ enum BuiltinProcId;
ENTITY_KIND(Procedure), \
ENTITY_KIND(Builtin), \
ENTITY_KIND(ImportName), \
ENTITY_KIND(Nil), \
ENTITY_KIND(Count),
@@ -68,6 +69,8 @@ struct Entity {
Scope *scope;
b32 used;
} ImportName;
struct {
} Nil;
};
};
@@ -155,6 +158,12 @@ Entity *make_entity_import_name(gbAllocator a, Scope *scope, Token token, Type *
return entity;
}
Entity *make_entity_nil(gbAllocator a, Scope *scope, Token token, Type *type) {
Entity *entity = alloc_entity(a, Entity_Nil, scope, token, type);
return entity;
}
Entity *make_entity_dummy_variable(gbAllocator a, Scope *file_scope, Token token) {
token.string = make_string("_");
return make_entity_variable(a, file_scope, token, NULL);