diff options
| author | gingerBill <bill@gingerbill.org> | 2017-10-29 11:35:21 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-10-29 11:35:21 +0000 |
| commit | a43b89f36e988df8268ee92ea54017806b3226bb (patch) | |
| tree | b9db9300453604a565ee3ac7e56c9fe6ad17be08 /src/checker.cpp | |
| parent | 0ed34af19d20aa5ae13c2147bd0f767d68d2e965 (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.cpp | 12 |
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; + } |