diff options
Diffstat (limited to 'src/checker/entity.cpp')
| -rw-r--r-- | src/checker/entity.cpp | 9 |
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); |