"Old style" enums

name and value information
`count`, `min_value`, `max_value` constants
This commit is contained in:
Ginger Bill
2017-01-08 20:24:12 +00:00
parent 659e5359b2
commit ff473e8342
9 changed files with 350 additions and 135 deletions
+6 -2
View File
@@ -25,6 +25,10 @@ Type_Info_Record :: struct #ordered {
packed: bool;
ordered: bool;
}
Type_Info_Enum_Value :: raw_union {
f: f64;
i: i64;
}
Type_Info :: union {
Named: struct #ordered {
@@ -74,7 +78,7 @@ Type_Info :: union {
Enum: struct #ordered {
base: ^Type_Info;
names: []string;
// TODO(bill): store values some how. Maybe using a raw_union
values: []Type_Info_Enum_Value;
};
}
@@ -115,7 +119,7 @@ fmuladd64 :: proc(a, b, c: f64) -> f64 #foreign "llvm.fmuladd.f64"
Allocator_Mode :: enum u8 {
ALLOC = iota,
ALLOC,
FREE,
FREE_ALL,
RESIZE,