mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 11:42:28 +00:00
Naming, use variant index instead of tag
This commit is contained in:
@@ -162,7 +162,12 @@ type_is_matrix :: proc($T: typeid) -> bool ---
|
||||
type_has_nil :: proc($T: typeid) -> bool ---
|
||||
|
||||
type_is_specialization_of :: proc($T, $S: typeid) -> bool ---
|
||||
|
||||
type_is_variant_of :: proc($U, $V: typeid) -> bool where type_is_union(U) ---
|
||||
type_union_tag :: proc($U: typeid) -> typeid where type_is_union(U) ---
|
||||
type_union_tag_offset :: proc($U: typeid) -> int where type_is_union(U) ---
|
||||
type_variant_type_of_of :: proc($U: typeid, $index: int) -> typeid where type_is_union(U) ---
|
||||
type_variant_index_of :: proc($U, $V: typeid) -> int where type_is_union(U) ---
|
||||
|
||||
type_has_field :: proc($T: typeid, $name: string) -> bool ---
|
||||
type_field_type :: proc($T: typeid, $name: string) -> typeid ---
|
||||
|
||||
@@ -262,8 +262,8 @@ BuiltinProc__type_simple_boolean_end,
|
||||
BuiltinProc_type_is_variant_of,
|
||||
BuiltinProc_type_union_tag,
|
||||
BuiltinProc_type_union_tag_offset,
|
||||
BuiltinProc_type_variant_type,
|
||||
BuiltinProc_type_variant_tag,
|
||||
BuiltinProc_type_variant_type_of,
|
||||
BuiltinProc_type_variant_index_of,
|
||||
|
||||
BuiltinProc_type_struct_field_count,
|
||||
|
||||
@@ -564,8 +564,8 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = {
|
||||
{STR_LIT("type_is_variant_of"), 2, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("type_union_tag"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("type_union_tag_offset"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("type_variant_type"), 2, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("type_variant_tag"), 2, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("type_variant_type_of"), 2, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
{STR_LIT("type_variant_index_of"), 2, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
|
||||
{STR_LIT("type_struct_field_count"), 1, false, Expr_Expr, BuiltinProcPkg_intrinsics},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user