Procedure grouping foo :: proc[foo16, foo32];

This commit is contained in:
gingerBill
2017-12-03 23:03:40 +00:00
parent 9f52b2c283
commit 596a2c8355
5 changed files with 167 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ struct DeclInfo;
ENTITY_KIND(Variable) \
ENTITY_KIND(TypeName) \
ENTITY_KIND(Procedure) \
ENTITY_KIND(ProcedureGrouping) \
ENTITY_KIND(Builtin) \
ENTITY_KIND(Alias) \
ENTITY_KIND(ImportName) \
@@ -107,6 +108,9 @@ struct Entity {
Entity * foreign_library;
AstNode * foreign_library_ident;
} Procedure;
struct {
Array<Entity *> entities;
} ProcedureGrouping;
struct {
i32 id;
} Builtin;
@@ -244,6 +248,12 @@ Entity *make_entity_procedure(gbAllocator a, Scope *scope, Token token, Type *si
return entity;
}
Entity *make_entity_procedure_grouping(gbAllocator a, Scope *scope, Token token, Type *type) {
Entity *entity = alloc_entity(a, Entity_ProcedureGrouping, scope, token, type);
return entity;
}
Entity *make_entity_builtin(gbAllocator a, Scope *scope, Token token, Type *type, i32 id) {
Entity *entity = alloc_entity(a, Entity_Builtin, scope, token, type);
entity->Builtin.id = id;