adjustment to test_cuik.c

This commit is contained in:
Edward R. Gonzalez 2024-12-16 20:54:19 -05:00
parent 46e816d7ce
commit a7cb7b0411

View File

@ -20,14 +20,15 @@ int main()
((gen_Macro){ txt("FOR_SUCC"), MT_Statement, MF_Functional }) ((gen_Macro){ txt("FOR_SUCC"), MT_Statement, MF_Functional })
)); ));
gen_CodeBody h_passes = gen_parse_file("Cuik/tb/opt/passes.h\n"); gen_CodeBody h_passes = gen_parse_file("Cuik/tb/opt/passes.h");
for (gen_Code code = gen_iterator(CodeBody, h_passes, code)) switch (code->Type) { for (gen_Code code = gen_iterator(CodeBody, h_passes, code)) switch (code->Type) {
case CT_Function_Fwd:
case CT_Function: case CT_Function:
gen_log_fmt("%S:\t%S params: %S return type: %S\n" gen_log_fmt("%S:\t%S RETURN_TYPE: %S PARAMS:%S\n"
, gen_codetype_to_str(code->Type) , gen_codetype_to_str(code->Type)
, code->Name , code->Name
, gen_strbuilder_to_str( gen_params_to_strbuilder( (gen_CodeParams) code->Params))
, gen_strbuilder_to_str( gen_typename_to_strbuilder((gen_CodeTypename) code->ReturnType)) , gen_strbuilder_to_str( gen_typename_to_strbuilder((gen_CodeTypename) code->ReturnType))
, gen_strbuilder_to_str( gen_params_to_strbuilder( (gen_CodeParams) code->Params))
); );
break; break;
@ -35,9 +36,10 @@ int main()
gen_log_fmt("%S:\t%S Type:%S\n", gen_codetype_to_str(code->Type), code->Name, code->ValueType); gen_log_fmt("%S:\t%S Type:%S\n", gen_codetype_to_str(code->Type), code->Name, code->ValueType);
break; break;
case CT_Struct_Fwd:
case CT_Struct: case CT_Struct:
case CT_Typedef: case CT_Typedef:
gen_log_fmt("%S:\t%S\n", gen_codetype_to_str(code->Type), code->Name); gen_log_fmt("%S: %S\n", gen_codetype_to_str(code->Type), code->Name);
break; break;
} }