mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-15 03:01:47 -07:00
preogress on getting dependencies compilable in C-library
This commit is contained in:
@ -7,7 +7,7 @@ using namespace gen;
|
||||
|
||||
CodeBody gen_hashtable_base()
|
||||
{
|
||||
return parse_global_body( code(
|
||||
CodeBody struct_def = parse_global_body( code(
|
||||
typedef struct HT_FindResult HT_FindResult;
|
||||
struct HT_FindResult
|
||||
{
|
||||
@ -16,6 +16,13 @@ CodeBody gen_hashtable_base()
|
||||
ssize EntryIndex;
|
||||
};
|
||||
));
|
||||
|
||||
Code define_type = untyped_str(txt(
|
||||
R"(#define Hashtable(_type) HTE_##_type
|
||||
)"
|
||||
));
|
||||
|
||||
return def_global_body(args(struct_def, define_type));
|
||||
}
|
||||
|
||||
CodeBody gen_hashtable( StrC type, StrC hashtable_name )
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
|
||||
b32 ignore_preprocess_cond_block( StrC cond_sig, Code& entry_iter, CodeBody& body )
|
||||
b32 ignore_preprocess_cond_block( StrC cond_sig, Code& entry_iter, CodeBody& parsed_body, CodeBody& body )
|
||||
{
|
||||
b32 found = false;
|
||||
CodePreprocessCond cond = cast(CodePreprocessCond, entry_iter);
|
||||
@ -16,7 +16,7 @@ b32 ignore_preprocess_cond_block( StrC cond_sig, Code& entry_iter, CodeBody& bod
|
||||
|
||||
s32 depth = 1;
|
||||
++ entry_iter;
|
||||
for(b32 continue_for = true; continue_for && entry_iter != body.end(); ) switch
|
||||
for(b32 continue_for = true; continue_for && entry_iter != parsed_body.end(); ) switch
|
||||
(entry_iter->Type) {
|
||||
case CT_Preprocess_If:
|
||||
case CT_Preprocess_IfDef:
|
||||
@ -27,7 +27,7 @@ b32 ignore_preprocess_cond_block( StrC cond_sig, Code& entry_iter, CodeBody& bod
|
||||
|
||||
case CT_Preprocess_Else:
|
||||
++ entry_iter;
|
||||
for(; continue_for && entry_iter != body.end(); ++ entry_iter)
|
||||
for(; continue_for && entry_iter != parsed_body.end(); ++ entry_iter)
|
||||
{
|
||||
if (entry_iter->Type == CT_Preprocess_EndIf)
|
||||
{
|
||||
|
Reference in New Issue
Block a user