Add enum type info and fix enum casting

This commit is contained in:
Ginger Bill
2017-01-01 16:58:38 +00:00
parent 6fef74317c
commit 311b5cb6e2
11 changed files with 178 additions and 193 deletions
+4 -5
View File
@@ -1,10 +1,8 @@
#shared_global_scope;
import {
"os.odin";
"fmt.odin";
"mem.odin";
}
import "os.odin";
import "fmt.odin";
import "mem.odin";
// IMPORTANT NOTE(bill): `type_info` & `type_info_val` cannot be used within a
// #shared_global_scope due to the internals of the compiler.
@@ -76,6 +74,7 @@ type {
Enum struct #ordered {
base ^Type_Info;
names []string;
// TODO(bill): store values some how. Maybe using a raw_union
};
}
}