aboutsummaryrefslogtreecommitdiff
path: root/src/checker/entity.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-08 00:23:14 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-08 00:23:14 +0100
commitc6d02e4778486c350a732105b6413ba1d32a234a (patch)
tree5b1dd564dd1e9c96dcf237cc06b3a09fba8854b2 /src/checker/entity.cpp
parent3d02f8a5fdcd18f08083994a51ac9518fc565f79 (diff)
Fix missing `type_info` with manual linear search
Diffstat (limited to 'src/checker/entity.cpp')
-rw-r--r--src/checker/entity.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp
index dd978e810..a1a368b6a 100644
--- a/src/checker/entity.cpp
+++ b/src/checker/entity.cpp
@@ -6,7 +6,6 @@ enum BuiltinProcId;
ENTITY_KIND(Invalid), \
ENTITY_KIND(Constant), \
ENTITY_KIND(Variable), \
- ENTITY_KIND(UsingVariable), \
ENTITY_KIND(TypeName), \
ENTITY_KIND(Procedure), \
ENTITY_KIND(Builtin), \
@@ -46,10 +45,12 @@ struct Entity {
b8 used; // Variable is used
b8 is_field; // Is struct field
b8 anonymous; // Variable is an anonymous
+ b8 is_using; // `using` variable
} Variable;
- struct {} UsingVariable;
struct {} TypeName;
- struct { b8 used; } Procedure;
+ struct {
+ b8 pure;
+ } Procedure;
struct { BuiltinProcId id; } Builtin;
};
};
@@ -77,8 +78,9 @@ Entity *make_entity_variable(gbAllocator a, Scope *scope, Token token, Type *typ
Entity *make_entity_using_variable(gbAllocator a, Entity *parent, Token token, Type *type) {
GB_ASSERT(parent != NULL);
- Entity *entity = alloc_entity(a, Entity_UsingVariable, parent->scope, token, type);
+ Entity *entity = alloc_entity(a, Entity_Variable, parent->scope, token, type);
entity->using_parent = parent;
+ entity->Variable.is_using = true;
return entity;
}