aboutsummaryrefslogtreecommitdiff
path: root/src/checker/entity.cpp
diff options
context:
space:
mode:
authorgingerBill <ginger.bill.22@gmail.com>2016-07-25 11:14:25 +0100
committergingerBill <ginger.bill.22@gmail.com>2016-07-25 11:14:25 +0100
commit32ab8fcf99df786c264ca566799b022c66cca34b (patch)
tree79b3f9642c1e49c3995b417fd8b599a20974f564 /src/checker/entity.cpp
parent9d8355d3612e65a5764640fb972bc4ef9f013088 (diff)
`alias` and unified parameters lists for procedures and structures.
Diffstat (limited to 'src/checker/entity.cpp')
-rw-r--r--src/checker/entity.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp
index aed4751ef..0553f8a50 100644
--- a/src/checker/entity.cpp
+++ b/src/checker/entity.cpp
@@ -8,6 +8,7 @@ enum EntityKind {
Entity_Constant,
Entity_Variable,
Entity_TypeName,
+ Entity_AliasName,
Entity_Procedure,
Entity_Builtin,
@@ -33,6 +34,7 @@ struct Entity {
b8 used;
} variable;
struct {} type_name;
+ struct {} alias_name;
struct {} procedure;
struct { BuiltinProcedureId id; } builtin;
};
@@ -70,14 +72,19 @@ Entity *make_entity_type_name(gbAllocator a, Scope *parent, Token token, Type *t
return entity;
}
+Entity *make_entity_alias_name(gbAllocator a, Scope *parent, Token token, Type *type) {
+ Entity *entity = alloc_entity(a, Entity_AliasName, parent, token, type);
+ return entity;
+}
+
Entity *make_entity_param(gbAllocator a, Scope *parent, Token token, Type *type) {
- Entity *entity = alloc_entity(a, Entity_Variable, parent, token, type);
+ Entity *entity = make_entity_variable(a, parent, token, type);
entity->variable.used = true;
return entity;
}
Entity *make_entity_field(gbAllocator a, Scope *parent, Token token, Type *type) {
- Entity *entity = alloc_entity(a, Entity_Variable, parent, token, type);
+ Entity *entity = make_entity_variable(a, parent, token, type);
entity->variable.is_field = true;
return entity;
}