aboutsummaryrefslogtreecommitdiff
path: root/src/checker/entity.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-06 17:11:17 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-06 17:11:17 +0100
commit50301557b2425fc0b4dd213ad03fb635cbd6e454 (patch)
treebcb09c25f839099ac172529283bc7e4a147614d8 /src/checker/entity.cpp
parentfee504636f9cd7633217e1877ee1b99e555bba63 (diff)
Untyped `nil`
Diffstat (limited to 'src/checker/entity.cpp')
-rw-r--r--src/checker/entity.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp
index 138e46236..8c1f254f3 100644
--- a/src/checker/entity.cpp
+++ b/src/checker/entity.cpp
@@ -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);