Rename to Type_Info_Parameters

This commit is contained in:
gingerBill
2023-02-08 11:23:21 +00:00
parent 2ff5d016d5
commit 6179d4feb1
9 changed files with 31 additions and 23 deletions
+6 -4
View File
@@ -83,8 +83,8 @@ Type_Info_Multi_Pointer :: struct {
elem: ^Type_Info,
}
Type_Info_Procedure :: struct {
params: ^Type_Info, // Type_Info_Tuple
results: ^Type_Info, // Type_Info_Tuple
params: ^Type_Info, // Type_Info_Parameters
results: ^Type_Info, // Type_Info_Parameters
variadic: bool,
convention: Calling_Convention,
}
@@ -104,10 +104,12 @@ Type_Info_Enumerated_Array :: struct {
}
Type_Info_Dynamic_Array :: struct {elem: ^Type_Info, elem_size: int}
Type_Info_Slice :: struct {elem: ^Type_Info, elem_size: int}
Type_Info_Tuple :: struct { // Only used for procedures parameters and results
Type_Info_Parameters :: struct { // Only used for procedures parameters and results
types: []^Type_Info,
names: []string,
}
Type_Info_Tuple :: Type_Info_Parameters // Will be removed eventually
Type_Info_Struct :: struct {
types: []^Type_Info,
@@ -208,7 +210,7 @@ Type_Info :: struct {
Type_Info_Enumerated_Array,
Type_Info_Dynamic_Array,
Type_Info_Slice,
Type_Info_Tuple,
Type_Info_Parameters,
Type_Info_Struct,
Type_Info_Union,
Type_Info_Enum,
+2 -2
View File
@@ -303,7 +303,7 @@ print_type :: proc "contextless" (ti: ^Type_Info) {
if info.params == nil {
print_string("()")
} else {
t := info.params.variant.(Type_Info_Tuple)
t := info.params.variant.(Type_Info_Parameters)
print_byte('(')
for t, i in t.types {
if i > 0 { print_string(", ") }
@@ -315,7 +315,7 @@ print_type :: proc "contextless" (ti: ^Type_Info) {
print_string(" -> ")
print_type(info.results)
}
case Type_Info_Tuple:
case Type_Info_Parameters:
count := len(info.names)
if count != 1 { print_byte('(') }
for name, i in info.names {