aboutsummaryrefslogtreecommitdiff
path: root/src/checker/entity.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-15 22:30:58 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-15 22:30:58 +0100
commit79af939522da622a85a513747890e5221be1ae4f (patch)
tree306c07ce761b8de77d4878795a2d629cad7c733d /src/checker/entity.cpp
parentf3209584a3ae22afc84f2bde6899e248bc86a154 (diff)
Update ImplicitValue "architecture"
Diffstat (limited to 'src/checker/entity.cpp')
-rw-r--r--src/checker/entity.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp
index 8b5578fff..0df216ce8 100644
--- a/src/checker/entity.cpp
+++ b/src/checker/entity.cpp
@@ -2,6 +2,7 @@ struct Scope;
struct Checker;
struct Type;
enum BuiltinProcId;
+enum ImplicitValueId;
#define ENTITY_KINDS \
ENTITY_KIND(Invalid), \
@@ -63,10 +64,13 @@ struct Entity {
String path;
String name;
Scope *scope;
- b32 used;
+ b32 used;
} ImportName;
struct {} Nil;
- struct {} ImplicitValue;
+ struct {
+ ImplicitValueId id;
+ Entity * backing;
+ } ImplicitValue;
};
};
@@ -160,9 +164,10 @@ Entity *make_entity_nil(gbAllocator a, String name, Type *type) {
return entity;
}
-Entity *make_entity_implicit_value(gbAllocator a, String name, Type *type) {
+Entity *make_entity_implicit_value(gbAllocator a, String name, Type *type, ImplicitValueId id) {
Token token = make_token_ident(name);
Entity *entity = alloc_entity(a, Entity_ImplicitValue, NULL, token, type);
+ entity->ImplicitValue.id = id;
return entity;
}