diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-08-25 00:23:04 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-08-25 00:23:04 +0100 |
| commit | f93cf3827ba5cde4f054db99b9815cb2a18ba861 (patch) | |
| tree | e40e0ee29127b21e473ca2139cc102d08e86d4b3 /src/checker/entity.cpp | |
| parent | d2c64be85ca15117b1745b254b1806ea739aef43 (diff) | |
Change rune literals to #rune "C"
Diffstat (limited to 'src/checker/entity.cpp')
| -rw-r--r-- | src/checker/entity.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/checker/entity.cpp b/src/checker/entity.cpp index b59481319..90c4f3198 100644 --- a/src/checker/entity.cpp +++ b/src/checker/entity.cpp @@ -31,7 +31,7 @@ struct Entity { EntityKind kind; EntityGuid guid; - Scope *parent; + Scope *scope; Token token; Type *type; @@ -54,52 +54,52 @@ EntityGuid next_entity_guid(void) { return cast(EntityGuid)gb_atomic64_fetch_add(&entity_guid_counter, 1); } -Entity *alloc_entity(gbAllocator a, EntityKind kind, Scope *parent, Token token, Type *type) { +Entity *alloc_entity(gbAllocator a, EntityKind kind, Scope *scope, Token token, Type *type) { Entity *entity = gb_alloc_item(a, Entity); entity->kind = kind; entity->guid = next_entity_guid(); - entity->parent = parent; + entity->scope = scope; entity->token = token; entity->type = type; return entity; } -Entity *make_entity_variable(gbAllocator a, Scope *parent, Token token, Type *type) { - Entity *entity = alloc_entity(a, Entity_Variable, parent, token, type); +Entity *make_entity_variable(gbAllocator a, Scope *scope, Token token, Type *type) { + Entity *entity = alloc_entity(a, Entity_Variable, scope, token, type); return entity; } -Entity *make_entity_constant(gbAllocator a, Scope *parent, Token token, Type *type, ExactValue value) { - Entity *entity = alloc_entity(a, Entity_Constant, parent, token, type); +Entity *make_entity_constant(gbAllocator a, Scope *scope, Token token, Type *type, ExactValue value) { + Entity *entity = alloc_entity(a, Entity_Constant, scope, token, type); entity->Constant.value = value; return entity; } -Entity *make_entity_type_name(gbAllocator a, Scope *parent, Token token, Type *type) { - Entity *entity = alloc_entity(a, Entity_TypeName, parent, token, type); +Entity *make_entity_type_name(gbAllocator a, Scope *scope, Token token, Type *type) { + Entity *entity = alloc_entity(a, Entity_TypeName, scope, token, type); return entity; } -Entity *make_entity_param(gbAllocator a, Scope *parent, Token token, Type *type) { - Entity *entity = make_entity_variable(a, parent, token, type); +Entity *make_entity_param(gbAllocator a, Scope *scope, Token token, Type *type) { + Entity *entity = make_entity_variable(a, scope, token, type); entity->Variable.used = true; return entity; } -Entity *make_entity_field(gbAllocator a, Scope *parent, Token token, Type *type, b32 is_anonymous) { - Entity *entity = make_entity_variable(a, parent, token, type); +Entity *make_entity_field(gbAllocator a, Scope *scope, Token token, Type *type, b32 is_anonymous) { + Entity *entity = make_entity_variable(a, scope, token, type); entity->Variable.is_field = true; entity->Variable.anonymous = cast(b8)is_anonymous; return entity; } -Entity *make_entity_procedure(gbAllocator a, Scope *parent, Token token, Type *signature_type) { - Entity *entity = alloc_entity(a, Entity_Procedure, parent, token, signature_type); +Entity *make_entity_procedure(gbAllocator a, Scope *scope, Token token, Type *signature_type) { + Entity *entity = alloc_entity(a, Entity_Procedure, scope, token, signature_type); return entity; } -Entity *make_entity_builtin(gbAllocator a, Scope *parent, Token token, Type *type, BuiltinProcId id) { - Entity *entity = alloc_entity(a, Entity_Builtin, parent, token, type); +Entity *make_entity_builtin(gbAllocator a, Scope *scope, Token token, Type *type, BuiltinProcId id) { + Entity *entity = alloc_entity(a, Entity_Builtin, scope, token, type); entity->Builtin.id = id; return entity; } |