was able to parse stb_sprintf.h, had to make mods to gencpp_c11.h (will eventually protogate to its repo)

This commit is contained in:
ed
2025-02-11 16:39:17 -05:00
parent 4976d79ab3
commit 6e36cee9e3
4 changed files with 121 additions and 68 deletions
+14 -14
View File
@@ -28,6 +28,20 @@ int main()
register_library_macros();
gen_CodeBody tb_stb_printf_h_parsed = gen_parse_file(path_third_party "stb/stb_sprintf.h");
gen_CodeBody tb_stb_printf_header = gen_def_body(CT_Global_Body);
gen_CodeBody tb_stb_printf_source = gen_def_body(CT_Global_Body);
for (gen_Code stb_code = gen_iterator(CodeBody, tb_stb_printf_h_parsed, stb_code)) switch(stb_code->Type)
{
case CT_Preprocess_Define:
{
}
break;
}
gen_Str generation_notice = lit(
"// This file was generated automatially by metadesk's gen_c11.c "
"(See: https://github.com/Ed94/metadesk/tree/master)\n\n"
@@ -348,20 +362,6 @@ int main()
if (GENERATE_SEGEREGATED)
{
gen_CodeBody tb_stb_printf_h_parsed = gen_parse_file(path_third_party "stb/stb_sprintf.h");
gen_CodeBody tb_stb_printf_header = gen_def_body(CT_Global_Body);
gen_CodeBody tb_stb_printf_source = gen_def_body(CT_Global_Body);
for (gen_Code stb_code = gen_iterator(CodeBody, tb_stb_printf_h_parsed, stb_code)) switch(stb_code->Type)
{
case CT_Preprocess_Define:
{
}
break;
}
// Dependencies
#define builder header_deps
+4 -10
View File
@@ -69,21 +69,15 @@ void register_library_macros()
// third_party/stb/stb_sprintf.h
gen_register_macros( args(
((gen_Macro) { lit("STB_SPRINTF_H_INCLUDE"), MT_Statement, }),
((gen_Macro) { lit("STBSP__ASAN"), MT_Statement, }),
((gen_Macro) { lit("STBSP__ASAN"), MT_Statement, MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__PUBLICDEC"), MT_Statement, MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__ATTRIBUTE_FORMAT"), MT_Statement, MF_Functional | MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__NOTUSED"), MT_Expression, MF_Functional | MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__NOTUSED"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("STB_SPRINTF_MIN"), MT_Expression, MF_Allow_As_Identifier }),
((gen_Macro) { lit("STB_SPRINTF_MIN"), MT_Expression, MF_Allow_As_Identifier }),
((gen_Macro) { lit("STB_SPRINTF_DECORATE"), MT_Expression, MF_Functional | MF_Allow_As_Identifier }),
((gen_Macro) { lit("stbsp__uint32"), MT_Expression, }),
((gen_Macro) { lit("stbsp__int32"), MT_Expression, }),
((gen_Macro) { lit("stbsp__uint64"), MT_Expression, }),
((gen_Macro) { lit("stbsp__int64"), MT_Expression, }),
((gen_Macro) { lit("stbsp__uint16"), MT_Expression, }),
((gen_Macro) { lit("stbsp__uintptr"), MT_Expression, }),
((gen_Macro) { lit("STB_SPRINTF_MSVC_MODE"), MT_Expression, }),
((gen_Macro) { lit("STBSP__PUBLICDEF"), MT_Expression, }),
((gen_Macro) { lit("STBSP__PUBLICDEF"), MT_Statement, MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__UNALIGNED"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("STBSP__SPECIAL"), MT_Expression, }),
((gen_Macro) { lit("STBSP__LEFTJUST"), MT_Expression, }),
@@ -105,7 +99,7 @@ void register_library_macros()
((gen_Macro) { lit("stbsp__cb_buf_clamp"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("STBSP__NUMSZ"), MT_Expression, }),
((gen_Macro) { lit("STBSP__COPYFP"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("stbsp__tento19th"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("stbsp__tento19th"), MT_Expression, }),
((gen_Macro) { lit("stbsp__ddmulthi"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("stbsp__ddrenorm"), MT_Expression, MF_Functional }),
((gen_Macro) { lit("stbsp__ddmultlo"), MT_Expression, MF_Functional }),