aboutsummaryrefslogtreecommitdiff
path: root/src/checker/checker.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-08-25 00:23:04 +0100
committerGinger Bill <bill@gingerbill.org>2016-08-25 00:23:04 +0100
commitf93cf3827ba5cde4f054db99b9815cb2a18ba861 (patch)
treee40e0ee29127b21e473ca2139cc102d08e86d4b3 /src/checker/checker.cpp
parentd2c64be85ca15117b1745b254b1806ea739aef43 (diff)
Change rune literals to #rune "C"
Diffstat (limited to 'src/checker/checker.cpp')
-rw-r--r--src/checker/checker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/checker/checker.cpp b/src/checker/checker.cpp
index 458ce0dce..fb2b9139e 100644
--- a/src/checker/checker.cpp
+++ b/src/checker/checker.cpp
@@ -251,7 +251,7 @@ void scope_lookup_parent_entity(Checker *c, Scope *s, String name, Scope **scope
if (found) {
Entity *e = *found;
if (gone_thru_proc) {
- if (e->kind == Entity_Variable && e->parent != c->global_scope) {
+ if (e->kind == Entity_Variable && e->scope != c->global_scope) {
continue;
}
}
@@ -292,8 +292,8 @@ Entity *scope_insert_entity(Scope *s, Entity *entity) {
if (found)
return *found;
map_set(&s->elements, key, entity);
- if (entity->parent == NULL)
- entity->parent = s;
+ if (entity->scope == NULL)
+ entity->scope = s;
return NULL;
}
@@ -640,7 +640,7 @@ void check_parsed_files(Checker *c) {
case_ast_node(td, TypeDecl, decl);
ast_node(n, Ident, td->name);
Entity *e = make_entity_type_name(c->allocator, c->global_scope, n->token, NULL);
- DeclInfo *d = make_declaration_info(c->allocator, e->parent);
+ DeclInfo *d = make_declaration_info(c->allocator, e->scope);
d->type_expr = td->type;
add_file_entity(c, td->name, e, d);
case_end;
@@ -650,7 +650,7 @@ void check_parsed_files(Checker *c) {
Token token = n->token;
Entity *e = make_entity_procedure(c->allocator, c->global_scope, token, NULL);
add_entity(c, c->global_scope, pd->name, e);
- DeclInfo *d = make_declaration_info(c->allocator, e->parent);
+ DeclInfo *d = make_declaration_info(c->allocator, e->scope);
d->proc_decl = decl;
map_set(&c->info.entities, hash_pointer(e), d);
case_end;