From 8d436fe5464483fbba491e9c045d17d30a73e9f3 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 13 Dec 2024 15:42:13 -0500 Subject: [PATCH] correct formatting in singleheader.cpp --- base/dependencies/string_ops.cpp | 4 ++-- base/dependencies/string_ops.hpp | 4 ++-- gen_c_library/c_library.refactor | 2 +- gen_singleheader/singleheader.cpp | 16 +++++++++------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/base/dependencies/string_ops.cpp b/base/dependencies/string_ops.cpp index 65a4bf8..36b7b69 100644 --- a/base/dependencies/string_ops.cpp +++ b/base/dependencies/string_ops.cpp @@ -3,7 +3,7 @@ # include "debug.cpp" #endif -#pragma region StrBuilder Ops +#pragma region String Ops internal ssize _scan_zpl_i64( const char* text, s32 base, s64* value ) @@ -211,4 +211,4 @@ f64 c_str_to_f64( const char* str, char** end_ptr ) return result; } -#pragma endregion StrBuilder Ops +#pragma endregion String Ops diff --git a/base/dependencies/string_ops.hpp b/base/dependencies/string_ops.hpp index dcfadd9..3e68f4d 100644 --- a/base/dependencies/string_ops.hpp +++ b/base/dependencies/string_ops.hpp @@ -3,7 +3,7 @@ # include "memory.hpp" #endif -#pragma region StrBuilder Ops +#pragma region String Ops const char* char_first_occurence( const char* str, char c ); @@ -284,4 +284,4 @@ void c_str_to_upper( char* str ) } } -#pragma endregion StrBuilder Ops +#pragma endregion String Ops diff --git a/gen_c_library/c_library.refactor b/gen_c_library/c_library.refactor index 2476059..7124a67 100644 --- a/gen_c_library/c_library.refactor +++ b/gen_c_library/c_library.refactor @@ -173,7 +173,7 @@ word PrintF_Buffer, gen_PrintF_Buffer word Msg_Invalid_Value, gen_Msg_Invalid_Value word log_fmt, gen_log_fmt -// StrBuilder Ops +// String Ops namespace char_, gen_char_ diff --git a/gen_singleheader/singleheader.cpp b/gen_singleheader/singleheader.cpp index d5adc4d..3ac4bbf 100644 --- a/gen_singleheader/singleheader.cpp +++ b/gen_singleheader/singleheader.cpp @@ -105,6 +105,7 @@ int gen_main() header.print( scan_file( path_base "dependencies/parsing.hpp" ) ); } + header.print(fmt_newline); header.print_fmt( "GEN_NS_END\n" ); header.print_fmt( roll_own_dependencies_guard_end ); header.print( fmt_newline ); @@ -155,7 +156,11 @@ int gen_main() if ( generate_builder ) { header.print( scan_file( path_base "auxillary/builder.hpp" ) ); } + if ( generate_scanner ) { + header.print( scan_file( path_base "auxillary/scanner.hpp" ) ); + } + header.print(fmt_newline); header.print_fmt( "GEN_NS_END\n" ); } @@ -177,7 +182,8 @@ int gen_main() header.print_fmt( roll_own_dependencies_guard_start ); header.print( impl_start ); - header.print_fmt( "GEN_NS_BEGIN\n\n"); + header.print( fmt_newline ); + header.print_fmt( "GEN_NS_BEGIN\n"); header.print( debug ); header.print( string_ops ); @@ -230,21 +236,17 @@ int gen_main() header.print( parsing_interface ); header.print_fmt( "\n#pragma endregion Parsing\n" ); header.print( untyped ); - header.print_fmt( "\n#pragma endregion Interface\n\n"); + header.print_fmt( "\n#pragma endregion Interface\n"); if ( generate_builder ) { header.print( scan_file( path_base "auxillary/builder.cpp" ) ); } - // Scanner header depends on implementation - if ( generate_scanner ) { - header.print( scan_file( path_base "auxillary/scanner.hpp" ) ); - } - if ( generate_scanner ) { header.print( scan_file( path_base "auxillary/scanner.cpp" ) ); } + header.print( fmt_newline); header.print_fmt( "GEN_NS_END\n"); header.print_fmt( "%s\n", (char const*) implementation_guard_end );