aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-07-19 14:01:56 +0100
committerGinger Bill <bill@gingerbill.org>2017-07-19 14:01:56 +0100
commitf1ab17ed4ef68a7591f8aa786e3c02d33d038f05 (patch)
treefe2313c560196c80fbfb114641fa5364d3bafb57 /src/checker.cpp
parent6113164211d5bd010ea324594d69668e5732817d (diff)
`type_info_of`; enum_value_to_string and string_to_enum_value
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index c2694774d..98e47c86a 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -40,7 +40,7 @@ enum BuiltinProcId {
BuiltinProc_align_of,
BuiltinProc_offset_of,
BuiltinProc_type_of,
- BuiltinProc_type_info,
+ BuiltinProc_type_info_of,
BuiltinProc_compile_assert,
@@ -86,7 +86,7 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = {
{STR_LIT("align_of"), 1, false, Expr_Expr},
{STR_LIT("offset_of"), 2, false, Expr_Expr},
{STR_LIT("type_of"), 1, false, Expr_Expr},
- {STR_LIT("type_info"), 1, false, Expr_Expr},
+ {STR_LIT("type_info_of"), 1, false, Expr_Expr},
{STR_LIT("compile_assert"), 1, false, Expr_Expr},
@@ -521,14 +521,15 @@ void scope_lookup_parent_entity(Scope *scope, String name, Scope **scope_, Entit
if (found) {
Entity *e = *found;
if (gone_thru_proc) {
- // if (e->kind == Entity_Label) {
- // continue;
- // }
- // if (e->kind == Entity_Variable &&
- // !e->scope->is_file &&
- // !e->scope->is_global) {
- // continue;
- // }
+ // IMPORTANT TODO(bill): Is this correct?!
+ if (e->kind == Entity_Label) {
+ continue;
+ }
+ if (e->kind == Entity_Variable &&
+ !e->scope->is_file &&
+ !e->scope->is_global) {
+ continue;
+ }
}
if (entity_) *entity_ = e;