From 596a2c835554a26cb0ad1f83892a3a11c04bad25 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 3 Dec 2017 23:03:40 +0000 Subject: Procedure grouping `foo :: proc[foo16, foo32];` --- src/entity.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/entity.cpp') diff --git a/src/entity.cpp b/src/entity.cpp index 940288957..ef49c4d0e 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -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 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; -- cgit v1.2.3