aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-10-29 11:35:21 +0000
committergingerBill <bill@gingerbill.org>2017-10-29 11:35:21 +0000
commita43b89f36e988df8268ee92ea54017806b3226bb (patch)
treeb9db9300453604a565ee3ac7e56c9fe6ad17be08 /src/checker.cpp
parent0ed34af19d20aa5ae13c2147bd0f767d68d2e965 (diff)
#alias type declarations; core library additions; `_global` import name for the global scope
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index f78249b2f..d6bbf754d 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -1716,7 +1716,19 @@ void init_preload(Checker *c) {
t_map_header = e->type;
}
+
+ {
+ String _global = str_lit("_global");
+
+ Entity *e = make_entity_import_name(c->allocator, c->global_scope->parent, make_token_ident(_global), t_invalid,
+ str_lit(""), _global,
+ c->global_scope);
+
+ add_entity(c, c->global_scope, nullptr, e);
+ }
+
c->done_preload = true;
+
}