Various fixes and adjustments

* moved constants to components/constants.hpp (adjsuted generators accordingly)
* parser accepts include & defineas parameter identifiers (will add more flags for keywords when necessary
This commit is contained in:
Edward R. Gonzalez 2025-02-04 15:34:57 -05:00
parent 5c17983a73
commit 6481313969
16 changed files with 133 additions and 130 deletions

View File

@ -0,0 +1,85 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
# pragma once
# include "interface.hpp"
#endif
#pragma region Constants
// Predefined typename codes. Are set to readonly and are setup during gen::init()
GEN_API extern Macro enum_underlying_macro;
GEN_API extern Code access_public;
GEN_API extern Code access_protected;
GEN_API extern Code access_private;
GEN_API extern CodeAttributes attrib_api_export;
GEN_API extern CodeAttributes attrib_api_import;
GEN_API extern Code module_global_fragment;
GEN_API extern Code module_private_fragment;
GEN_API extern Code fmt_newline;
GEN_API extern CodePragma pragma_once;
GEN_API extern CodeParams param_varadic;
GEN_API extern CodePreprocessCond preprocess_else;
GEN_API extern CodePreprocessCond preprocess_endif;
GEN_API extern CodeSpecifiers spec_const;
GEN_API extern CodeSpecifiers spec_consteval;
GEN_API extern CodeSpecifiers spec_constexpr;
GEN_API extern CodeSpecifiers spec_constinit;
GEN_API extern CodeSpecifiers spec_extern_linkage;
GEN_API extern CodeSpecifiers spec_final;
GEN_API extern CodeSpecifiers spec_forceinline;
GEN_API extern CodeSpecifiers spec_global;
GEN_API extern CodeSpecifiers spec_inline;
GEN_API extern CodeSpecifiers spec_internal_linkage;
GEN_API extern CodeSpecifiers spec_local_persist;
GEN_API extern CodeSpecifiers spec_mutable;
GEN_API extern CodeSpecifiers spec_neverinline;
GEN_API extern CodeSpecifiers spec_noexcept;
GEN_API extern CodeSpecifiers spec_override;
GEN_API extern CodeSpecifiers spec_ptr;
GEN_API extern CodeSpecifiers spec_pure;
GEN_API extern CodeSpecifiers spec_ref;
GEN_API extern CodeSpecifiers spec_register;
GEN_API extern CodeSpecifiers spec_rvalue;
GEN_API extern CodeSpecifiers spec_static_member;
GEN_API extern CodeSpecifiers spec_thread_local;
GEN_API extern CodeSpecifiers spec_virtual;
GEN_API extern CodeSpecifiers spec_volatile;
GEN_API extern CodeTypename t_empty; // Used with varaidc parameters. (Exposing just in case its useful for another circumstance)
GEN_API extern CodeTypename t_auto;
GEN_API extern CodeTypename t_void;
GEN_API extern CodeTypename t_int;
GEN_API extern CodeTypename t_bool;
GEN_API extern CodeTypename t_char;
GEN_API extern CodeTypename t_wchar_t;
GEN_API extern CodeTypename t_class;
GEN_API extern CodeTypename t_typename;
#ifdef GEN_DEFINE_LIBRARY_CODE_CONSTANTS
GEN_API extern CodeTypename t_b32;
GEN_API extern CodeTypename t_s8;
GEN_API extern CodeTypename t_s16;
GEN_API extern CodeTypename t_s32;
GEN_API extern CodeTypename t_s64;
GEN_API extern CodeTypename t_u8;
GEN_API extern CodeTypename t_u16;
GEN_API extern CodeTypename t_u32;
GEN_API extern CodeTypename t_u64;
GEN_API extern CodeTypename t_ssize;
GEN_API extern CodeTypename t_usize;
GEN_API extern CodeTypename t_f32;
GEN_API extern CodeTypename t_f64;
#endif
#pragma endregion Constants

View File

@ -1,5 +0,0 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#pragma once
#include "inlines.hpp"
#include "gen/ast_inlines.hpp"
#endif

View File

@ -15,7 +15,7 @@
| \_____|\___}_l |_|\___} ,__/| ,__/ (_____/ \__\__/_|\__, |\___}\__,_l | | \_____|\___}_l |_|\___} ,__/| ,__/ (_____/ \__\__/_|\__, |\___}\__,_l |
| | | | | __} | | | | | | | __} | |
| l_l l_l {___/ | | l_l l_l {___/ |
! ----------------------------------------------------------------------- VERSION: v0.23-Alpha | ! ----------------------------------------------------------------------- VERSION: v0.25-Alpha |
! ============================================================================================ | ! ============================================================================================ |
! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION | ! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION |
! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL | ! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL |

View File

@ -474,84 +474,3 @@ So the full call for this example would be:
#pragma endregion Macros #pragma endregion Macros
#pragma endregion Gen Interface #pragma endregion Gen Interface
#pragma region Constants
// Predefined typename codes. Are set to readonly and are setup during gen::init()
GEN_API extern Macro enum_underlying_macro;
GEN_API extern Code access_public;
GEN_API extern Code access_protected;
GEN_API extern Code access_private;
GEN_API extern CodeAttributes attrib_api_export;
GEN_API extern CodeAttributes attrib_api_import;
GEN_API extern Code module_global_fragment;
GEN_API extern Code module_private_fragment;
GEN_API extern Code fmt_newline;
GEN_API extern CodePragma pragma_once;
GEN_API extern CodeParams param_varadic;
GEN_API extern CodePreprocessCond preprocess_else;
GEN_API extern CodePreprocessCond preprocess_endif;
GEN_API extern CodeSpecifiers spec_const;
GEN_API extern CodeSpecifiers spec_consteval;
GEN_API extern CodeSpecifiers spec_constexpr;
GEN_API extern CodeSpecifiers spec_constinit;
GEN_API extern CodeSpecifiers spec_extern_linkage;
GEN_API extern CodeSpecifiers spec_final;
GEN_API extern CodeSpecifiers spec_forceinline;
GEN_API extern CodeSpecifiers spec_global;
GEN_API extern CodeSpecifiers spec_inline;
GEN_API extern CodeSpecifiers spec_internal_linkage;
GEN_API extern CodeSpecifiers spec_local_persist;
GEN_API extern CodeSpecifiers spec_mutable;
GEN_API extern CodeSpecifiers spec_neverinline;
GEN_API extern CodeSpecifiers spec_noexcept;
GEN_API extern CodeSpecifiers spec_override;
GEN_API extern CodeSpecifiers spec_ptr;
GEN_API extern CodeSpecifiers spec_pure;
GEN_API extern CodeSpecifiers spec_ref;
GEN_API extern CodeSpecifiers spec_register;
GEN_API extern CodeSpecifiers spec_rvalue;
GEN_API extern CodeSpecifiers spec_static_member;
GEN_API extern CodeSpecifiers spec_thread_local;
GEN_API extern CodeSpecifiers spec_virtual;
GEN_API extern CodeSpecifiers spec_volatile;
GEN_API extern CodeTypename t_empty; // Used with varaidc parameters. (Exposing just in case its useful for another circumstance)
GEN_API extern CodeTypename t_auto;
GEN_API extern CodeTypename t_void;
GEN_API extern CodeTypename t_int;
GEN_API extern CodeTypename t_bool;
GEN_API extern CodeTypename t_char;
GEN_API extern CodeTypename t_wchar_t;
GEN_API extern CodeTypename t_class;
GEN_API extern CodeTypename t_typename;
#ifdef GEN_DEFINE_LIBRARY_CODE_CONSTANTS
GEN_API extern CodeTypename t_b32;
GEN_API extern CodeTypename t_s8;
GEN_API extern CodeTypename t_s16;
GEN_API extern CodeTypename t_s32;
GEN_API extern CodeTypename t_s64;
GEN_API extern CodeTypename t_u8;
GEN_API extern CodeTypename t_u16;
GEN_API extern CodeTypename t_u32;
GEN_API extern CodeTypename t_u64;
GEN_API extern CodeTypename t_ssize;
GEN_API extern CodeTypename t_usize;
GEN_API extern CodeTypename t_f32;
GEN_API extern CodeTypename t_f64;
#endif
#pragma endregion Constants

View File

@ -488,6 +488,10 @@ void lex_found_token( LexContext* ctx )
TokType type = str_to_toktype( ctx->token.Text ); TokType type = str_to_toktype( ctx->token.Text );
if (type == Tok_Preprocess_Define || type == Tok_Preprocess_Include) {
ctx->token.Flags |= TF_Identifier;
}
if (type <= Tok_Access_Public && type >= Tok_Access_Private ) { if (type <= Tok_Access_Public && type >= Tok_Access_Private ) {
ctx->token.Flags |= TF_AccessSpecifier; ctx->token.Flags |= TF_AccessSpecifier;
} }

View File

@ -2788,10 +2788,10 @@ CodeParams parse_params( bool use_template_capture )
} }
// ( <Macro> <ValueType> // ( <Macro> <ValueType>
if ( check( Tok_Identifier ) ) if ( check( Tok_Identifier ) || bitfield_is_set(u32, currtok.Flags, TF_Identifier) )
{ {
name = currtok; name = currtok;
eat( Tok_Identifier ); eat( currtok.Type );
// ( <Macro> <ValueType> <Name> // ( <Macro> <ValueType> <Name>
} }
@ -2899,10 +2899,10 @@ CodeParams parse_params( bool use_template_capture )
name = NullToken; name = NullToken;
if ( check( Tok_Identifier ) ) if ( check( Tok_Identifier ) || bitfield_is_set(u32, currtok.Flags, TF_Identifier) )
{ {
name = currtok; name = currtok;
eat( Tok_Identifier ); eat( currtok.Type );
// ( <Macro> <ValueType> <Name> = <Expression>, <Macro> <ValueType> <Name> // ( <Macro> <ValueType> <Name> = <Expression>, <Macro> <ValueType> <Name>
} }

View File

@ -11,17 +11,18 @@ enum TokFlags : u32
{ {
TF_Operator = bit(0), TF_Operator = bit(0),
TF_Assign = bit(1), TF_Assign = bit(1),
TF_Preprocess = bit(2), TF_Identifier = bit(2),
TF_Preprocess_Cond = bit(3), TF_Preprocess = bit(3),
TF_Attribute = bit(6), TF_Preprocess_Cond = bit(4),
TF_AccessOperator = bit(7), TF_Attribute = bit(5),
TF_AccessSpecifier = bit(8), TF_AccessOperator = bit(6),
TF_Specifier = bit(9), TF_AccessSpecifier = bit(7),
TF_EndDefinition = bit(10), // Either ; or } TF_Specifier = bit(8),
TF_Formatting = bit(11), TF_EndDefinition = bit(9), // Either ; or }
TF_Literal = bit(12), TF_Formatting = bit(10),
TF_Macro_Functional = bit(13), TF_Literal = bit(11),
TF_Macro_Expects_Body = bit(14), TF_Macro_Functional = bit(12),
TF_Macro_Expects_Body = bit(13),
TF_Null = 0, TF_Null = 0,
TF_UnderlyingType = GEN_U32_MAX, TF_UnderlyingType = GEN_U32_MAX,

View File

@ -29,9 +29,9 @@ GEN_NS_BEGIN
#include "components/interface.hpp" #include "components/interface.hpp"
#include "components/constants.hpp"
#include "components/inlines.hpp" #include "components/inlines.hpp"
#include "components/gen/ast_inlines.hpp" #include "components/gen/ast_inlines.hpp"
#include "components/header_end.hpp"
#include "auxiliary/builder.hpp" #include "auxiliary/builder.hpp"
#include "auxiliary/scanner.hpp" #include "auxiliary/scanner.hpp"

View File

@ -509,7 +509,7 @@ do \
case CT_Variable: case CT_Variable:
{ {
CodeVar var = cast(CodeVar, entry); CodeVar var = cast(CodeVar, entry);
if (var->Specs.has(Spec_Constexpr) > -1) if (var->Specs.has(Spec_Constexpr))
{ {
Opts_def_define opts = { {}, entry->Value->Content }; Opts_def_define opts = { {}, entry->Value->Content };
CodeDefine define = def_define(entry->Name, MT_Expression, opts); CodeDefine define = def_define(entry->Name, MT_Expression, opts);
@ -769,7 +769,7 @@ do \
case CT_Variable: case CT_Variable:
{ {
CodeVar var = cast(CodeVar, entry); CodeVar var = cast(CodeVar, entry);
if (var->Specs && var->Specs.has(Spec_Constexpr) > -1) { if (var->Specs && var->Specs.has(Spec_Constexpr)) {
Code define_ver = untyped_str(token_fmt( Code define_ver = untyped_str(token_fmt(
"name", var->Name "name", var->Name
, "value", var->Value->Content , "value", var->Value->Content
@ -1257,16 +1257,16 @@ R"(#define <interface_name>( code ) _Generic( (code), \
} }
s32 idx = 0; s32 idx = 0;
CodeBody parsed_header_end = parse_file( path_base "components/header_end.hpp" ); CodeBody parsed_constants = parse_file( path_base "components/constants.hpp" );
CodeBody header_end = def_body(CT_Global_Body); CodeBody constants = def_body(CT_Global_Body);
for ( Code entry = parsed_header_end.begin(); entry != parsed_header_end.end(); ++ entry, ++ idx ) switch( entry->Type ) for ( Code entry = parsed_constants.begin(); entry != parsed_constants.end(); ++ entry, ++ idx ) switch( entry->Type )
{ {
case CT_Preprocess_IfDef: case CT_Preprocess_IfDef:
{ {
b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_header_end, header_end ); b32 found = ignore_preprocess_cond_block(txt("GEN_INTELLISENSE_DIRECTIVES"), entry, parsed_constants, constants );
if (found) break; if (found) break;
header_end.append(entry); constants.append(entry);
} }
break; break;
@ -1280,16 +1280,16 @@ R"(#define <interface_name>( code ) _Generic( (code), \
{ {
Opts_def_define opts = { {}, entry->Value->Content }; Opts_def_define opts = { {}, entry->Value->Content };
CodeDefine define = def_define(entry->Name, MT_Expression, opts ); CodeDefine define = def_define(entry->Name, MT_Expression, opts );
header_end.append(define); constants.append(define);
continue; continue;
} }
} }
header_end.append(entry); constants.append(entry);
} }
break; break;
default: default:
header_end.append(entry); constants.append(entry);
break; break;
} }
#pragma endregion Resolve Components #pragma endregion Resolve Components
@ -1542,7 +1542,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
case CT_Variable: case CT_Variable:
{ {
CodeVar var = cast(CodeVar, entry); CodeVar var = cast(CodeVar, entry);
if (var->Specs && var->Specs.has(Spec_Constexpr) > -1) { if (var->Specs && var->Specs.has(Spec_Constexpr)) {
Code define_ver = untyped_str(token_fmt( Code define_ver = untyped_str(token_fmt(
"name", var->Name "name", var->Name
, "value", var->Value->Content , "value", var->Value->Content
@ -1587,7 +1587,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
case CT_Variable: case CT_Variable:
{ {
CodeVar var = cast(CodeVar, entry); CodeVar var = cast(CodeVar, entry);
if (var->Specs && var->Specs.has(Spec_Constexpr) > -1) { if (var->Specs && var->Specs.has(Spec_Constexpr)) {
Code define_ver = untyped_str(token_fmt( Code define_ver = untyped_str(token_fmt(
"name", var->Name "name", var->Name
, "value", var->Value->Content , "value", var->Value->Content
@ -1673,11 +1673,11 @@ R"(#define <interface_name>( code ) _Generic( (code), \
Code rf_ast_types = refactor_and_format(ast_types); Code rf_ast_types = refactor_and_format(ast_types);
Code rf_interface = refactor_and_format(interface); Code rf_interface = refactor_and_format(interface);
Code rf_constants = refactor_and_format(constants);
Code rf_inlines = refactor_and_format(inlines); Code rf_inlines = refactor_and_format(inlines);
Code rf_ht_preprocessor_macro = refactor_and_format(ht_preprocessor_macro); Code rf_ht_preprocessor_macro = refactor_and_format(ht_preprocessor_macro);
Code rf_array_string_cached = refactor_and_format(array_string_cached); Code rf_array_string_cached = refactor_and_format(array_string_cached);
Code rf_header_end = refactor_and_format(header_end);
Code rf_header_builder = refactor_and_format(header_builder); Code rf_header_builder = refactor_and_format(header_builder);
Code rf_header_scanner = refactor_and_format( scan_file( path_base "auxiliary/scanner.hpp" )); Code rf_header_scanner = refactor_and_format( scan_file( path_base "auxiliary/scanner.hpp" ));
@ -1788,6 +1788,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( rf_ht_preprocessor_macro ); header.print( rf_ht_preprocessor_macro );
header.print( rf_interface ); header.print( rf_interface );
header.print( rf_constants );
header.print(fmt_newline); header.print(fmt_newline);
header.print_fmt("#pragma region Inlines\n"); header.print_fmt("#pragma region Inlines\n");
@ -1796,7 +1797,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print(fmt_newline); header.print(fmt_newline);
header.print( rf_header_end );
header.print( rf_header_builder ); header.print( rf_header_builder );
header.print( rf_header_scanner ); header.print( rf_header_scanner );
@ -1950,6 +1950,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print_fmt("\n#pragma endregion AST\n"); header.print_fmt("\n#pragma endregion AST\n");
header.print( rf_interface ); header.print( rf_interface );
header.print( rf_constants );
header.print(fmt_newline); header.print(fmt_newline);
header.print_fmt("#pragma region Inlines\n"); header.print_fmt("#pragma region Inlines\n");
@ -1959,7 +1960,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print(fmt_newline); header.print(fmt_newline);
header.print( rf_array_string_cached ); header.print( rf_array_string_cached );
header.print( rf_header_end );
header.print( rf_header_builder ); header.print( rf_header_builder );
header.print( rf_header_scanner ); header.print( rf_header_scanner );

View File

@ -13,7 +13,7 @@
| \_____|\___}_l |_|\___} .__/| .__/ {_____/ \__\__/_l\__. |\___/\__,_l \____}{_____}{_____} | | \_____|\___}_l |_|\___} .__/| .__/ {_____/ \__\__/_l\__. |\___/\__,_l \____}{_____}{_____} |
| | | | | __} | | | | | | | __} | |
| l_l l_l {___/ | | l_l l_l {___/ |
! ----------------------------------------------------------------------- VERSION: v0.23-Alpha | ! ----------------------------------------------------------------------- VERSION: v0.25-Alpha |
! ============================================================================================= | ! ============================================================================================= |
! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION | ! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION |
! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL | ! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL |

View File

@ -131,8 +131,8 @@ int gen_main()
Code ast_types = scan_file( path_base "components/ast_types.hpp" ); Code ast_types = scan_file( path_base "components/ast_types.hpp" );
Code code_types = scan_file( path_base "components/code_types.hpp" ); Code code_types = scan_file( path_base "components/code_types.hpp" );
Code interface = scan_file( path_base "components/interface.hpp" ); Code interface = scan_file( path_base "components/interface.hpp" );
Code constants = scan_file( path_base "components/constants.hpp");
Code inlines = scan_file( path_base "components/inlines.hpp" ); Code inlines = scan_file( path_base "components/inlines.hpp" );
Code header_end = scan_file( path_base "components/header_end.hpp" );
CodeBody ecode = gen_ecode ( path_base "enums/ECodeTypes.csv" ); CodeBody ecode = gen_ecode ( path_base "enums/ECodeTypes.csv" );
CodeBody eoperator = gen_eoperator ( path_base "enums/EOperator.csv" ); CodeBody eoperator = gen_eoperator ( path_base "enums/EOperator.csv" );
@ -168,6 +168,7 @@ int gen_main()
builder_print_fmt( header, "\n#pragma endregion AST\n" ); builder_print_fmt( header, "\n#pragma endregion AST\n" );
builder_print( header, interface ); builder_print( header, interface );
builder_print( header, constants );
builder_print_fmt( header, "\n#pragma region Inlines\n" ); builder_print_fmt( header, "\n#pragma region Inlines\n" );
builder_print( header, inlines ); builder_print( header, inlines );
@ -176,7 +177,6 @@ int gen_main()
builder_print( header, fmt_newline ); builder_print( header, fmt_newline );
builder_print_fmt( header, "#pragma endregion Inlines\n" ); builder_print_fmt( header, "#pragma endregion Inlines\n" );
builder_print( header, header_end );
builder_print_fmt( header, "\nGEN_NS_END\n\n" ); builder_print_fmt( header, "\nGEN_NS_END\n\n" );
builder_print( header, pop_ignores ); builder_print( header, pop_ignores );
builder_write(header); builder_write(header);

View File

@ -15,7 +15,7 @@
| \_____|\___}_l |_|\___} ,__/| ,__/ (_____/ \__\__/_|\__, |\___}\__,_l | | \_____|\___}_l |_|\___} ,__/| ,__/ (_____/ \__\__/_|\__, |\___}\__,_l |
| Singleheader | | | | __} | | | Singleheader | | | | __} | |
| l_l l_l {___/ | | l_l l_l {___/ |
! ----------------------------------------------------------------------- VERSION: v0.23-Alpha | ! ----------------------------------------------------------------------- VERSION: v0.25-Alpha |
! ============================================================================================ | ! ============================================================================================ |
! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION | ! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION |
! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL | ! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL |

View File

@ -117,8 +117,8 @@ int gen_main()
Code ast_types = scan_file( path_base "components/ast_types.hpp" ); Code ast_types = scan_file( path_base "components/ast_types.hpp" );
Code code_types = scan_file( path_base "components/code_types.hpp" ); Code code_types = scan_file( path_base "components/code_types.hpp" );
Code interface = scan_file( path_base "components/interface.hpp" ); Code interface = scan_file( path_base "components/interface.hpp" );
Code constants = scan_file( path_base "components/constants.hpp" );
Code inlines = scan_file( path_base "components/inlines.hpp" ); Code inlines = scan_file( path_base "components/inlines.hpp" );
Code header_end = scan_file( path_base "components/header_end.hpp" );
CodeBody ecode = gen_ecode ( path_base "enums/ECodeTypes.csv" ); CodeBody ecode = gen_ecode ( path_base "enums/ECodeTypes.csv" );
CodeBody eoperator = gen_eoperator ( path_base "enums/EOperator.csv" ); CodeBody eoperator = gen_eoperator ( path_base "enums/EOperator.csv" );
@ -149,6 +149,7 @@ int gen_main()
header.print_fmt("\n#pragma endregion AST\n"); header.print_fmt("\n#pragma endregion AST\n");
header.print( interface ); header.print( interface );
header.print( constants );
header.print_fmt( "\n#pragma region Inlines\n" ); header.print_fmt( "\n#pragma region Inlines\n" );
header.print( inlines ); header.print( inlines );
@ -156,8 +157,6 @@ int gen_main()
header.print( fmt_newline ); header.print( fmt_newline );
header.print_fmt( "#pragma endregion Inlines\n" ); header.print_fmt( "#pragma endregion Inlines\n" );
header.print( header_end );
if ( generate_builder ) { if ( generate_builder ) {
header.print( scan_file( path_base "auxiliary/builder.hpp" ) ); header.print( scan_file( path_base "auxiliary/builder.hpp" ) );
} }

View File

@ -16,7 +16,7 @@
| \_____|\___}_l |_|\___} ,__/| ,__/ (_____/ \__\__/_|\__, |\___}\__,_l | | \_____|\___}_l |_|\___} ,__/| ,__/ (_____/ \__\__/_|\__, |\___}\__,_l |
| Unreal Engine | | | | __} | | | Unreal Engine | | | | __} | |
| l_l l_l {___/ | | l_l l_l {___/ |
! ----------------------------------------------------------------------- VERSION: v0.23-Alpha | ! ----------------------------------------------------------------------- VERSION: v0.25-Alpha |
! ============================================================================================ | ! ============================================================================================ |
! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION | ! WARNING: THIS IS AN ALPHA VERSION OF THE LIBRARY, USE AT YOUR OWN DISCRETION |
! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL | ! NEVER DO CODE GENERATION WITHOUT AT LEAST HAVING CONTENT IN A CODEBASE UNDER VERSION CONTROL |

View File

@ -224,8 +224,8 @@ int gen_main()
Code ast_types = scan_file( path_base "components/ast_types.hpp" ); Code ast_types = scan_file( path_base "components/ast_types.hpp" );
Code code_types = scan_file( path_base "components/code_types.hpp" ); Code code_types = scan_file( path_base "components/code_types.hpp" );
Code interface = scan_file( path_base "components/interface.hpp" ); Code interface = scan_file( path_base "components/interface.hpp" );
Code constants = scan_file( path_base "components/constants.hpp" );
Code inlines = scan_file( path_base "components/inlines.hpp" ); Code inlines = scan_file( path_base "components/inlines.hpp" );
Code header_end = scan_file( path_base "components/header_end.hpp" );
CodeBody ecode = gen_ecode ( path_base "enums/ECodeTypes.csv" ); CodeBody ecode = gen_ecode ( path_base "enums/ECodeTypes.csv" );
CodeBody eoperator = gen_eoperator ( path_base "enums/EOperator.csv" ); CodeBody eoperator = gen_eoperator ( path_base "enums/EOperator.csv" );
@ -266,6 +266,7 @@ int gen_main()
header.print_fmt( "\n#pragma endregion AST\n" ); header.print_fmt( "\n#pragma endregion AST\n" );
header.print( interface ); header.print( interface );
header.print( constants );
header.print_fmt( "\n#pragma region Inlines\n" ); header.print_fmt( "\n#pragma region Inlines\n" );
header.print( inlines ); header.print( inlines );
@ -274,7 +275,6 @@ int gen_main()
header.print( fmt_newline ); header.print( fmt_newline );
header.print_fmt( "#pragma endregion Inlines\n" ); header.print_fmt( "#pragma endregion Inlines\n" );
header.print( header_end );
header.print_fmt( "\nGEN_NS_END\n\n" ); header.print_fmt( "\nGEN_NS_END\n\n" );
header.print( pop_ignores ); header.print( pop_ignores );
header.write(); header.write();

View File

@ -172,7 +172,7 @@ if ( $segmented )
write-host `t $_ -ForegroundColor Green write-host `t $_ -ForegroundColor Green
} }
} }
write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" write-host "`nSegmented completed in $($time_taken.TotalMilliseconds) ms"
} }
Pop-Location Pop-Location
} }