mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-30 19:01:02 -07:00
Significant progress reducing c++ feature usage in the library.
This commit is contained in:
@ -13,7 +13,7 @@ CodeBody gen_ecode( char const* path )
|
||||
char scratch_mem[kilobytes(1)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
file_read_contents( allocator_info(scratch), zero_terminate, path );
|
||||
file_read_contents( allocator_info( & scratch), zero_terminate, path );
|
||||
|
||||
CSV_Object csv_nodes;
|
||||
csv_parse( &csv_nodes, scratch_mem, GlobalAllocator, false );
|
||||
@ -59,7 +59,7 @@ CodeBody gen_eoperator( char const* path )
|
||||
char scratch_mem[kilobytes(4)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
file_read_contents( allocator_info(scratch), zero_terminate, path );
|
||||
file_read_contents( allocator_info(& scratch), zero_terminate, path );
|
||||
|
||||
CSV_Object csv_nodes;
|
||||
csv_parse( &csv_nodes, scratch_mem, GlobalAllocator, false );
|
||||
@ -115,7 +115,7 @@ CodeBody gen_especifier( char const* path )
|
||||
char scratch_mem[kilobytes(4)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
file_read_contents( allocator_info(scratch), zero_terminate, path );
|
||||
file_read_contents( allocator_info(& scratch), zero_terminate, path );
|
||||
|
||||
CSV_Object csv_nodes;
|
||||
csv_parse( &csv_nodes, scratch_mem, GlobalAllocator, false );
|
||||
@ -220,7 +220,7 @@ CodeBody gen_etoktype( char const* etok_path, char const* attr_path )
|
||||
char scratch_mem[kilobytes(16)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
AllocatorInfo scratch_info = allocator_info(scratch);
|
||||
AllocatorInfo scratch_info = allocator_info(& scratch);
|
||||
|
||||
FileContents enum_content = file_read_contents( scratch_info, zero_terminate, etok_path );
|
||||
|
||||
@ -342,8 +342,10 @@ CodeBody gen_etoktype( char const* etok_path, char const* attr_path )
|
||||
|
||||
CodeBody gen_ast_inlines()
|
||||
{
|
||||
#pragma push_macro("GEN_NS")
|
||||
#pragma push_macro("rcast")
|
||||
#pragma push_macro("log_failure")
|
||||
#undef GEN_NS
|
||||
#undef rcast
|
||||
#undef log_failure
|
||||
char const* code_impl_tmpl = stringize(
|
||||
@ -354,7 +356,7 @@ CodeBody gen_ast_inlines()
|
||||
if ( ast == nullptr )
|
||||
return "Code::debug_str: AST is null!";
|
||||
|
||||
return rcast(AST*, ast)->debug_str();
|
||||
return GEN_NS debug_str( rcast(AST*, ast) );
|
||||
}
|
||||
inline
|
||||
Code <typename>::duplicate()
|
||||
@ -455,6 +457,7 @@ CodeBody gen_ast_inlines()
|
||||
}
|
||||
\n
|
||||
);
|
||||
#pragma pop_macro("GEN_NS")
|
||||
|
||||
CodeBody impl_code = parse_global_body( token_fmt( "typename", StrC name(Code), code_impl_tmpl ));
|
||||
CodeBody impl_code_body = parse_global_body( token_fmt( "typename", StrC name(CodeBody), code_impl_tmpl ));
|
||||
|
Reference in New Issue
Block a user