Compare commits

..

No commits in common. "3c249d2fae1d52133063d66a3fc287d5562c558e" and "96ffca3094fecfd2475421c686064143c670923c" have entirely different histories.

28 changed files with 1069 additions and 524 deletions

7
.gitignore vendored
View File

@ -32,10 +32,3 @@ test/gen/original
singleheader/gen/scratch.hpp singleheader/gen/scratch.hpp
test/gen/scratch.cpp test/gen/scratch.cpp
gen_c_library/gen gen_c_library/gen
**/*.sln
**/*.sln.DotSettings.user
**/*.10x
**/*.vcxproj
**/*.vcxproj.filters
**/*.vcxproj.user

22
.vscode/settings.json vendored
View File

@ -73,25 +73,5 @@
}, },
"autoHide.autoHidePanel": false, "autoHide.autoHidePanel": false,
"autoHide.autoHideSideBar": false, "autoHide.autoHideSideBar": false,
"dimmer.enabled": false, "dimmer.enabled": false
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#fa1b49",
"activityBar.background": "#fa1b49",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#155e02",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#fa1b49",
"statusBar.background": "#dd0531",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#fa1b49",
"statusBarItem.remoteBackground": "#dd0531",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#dd0531",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#dd053199",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#dd0531"
} }

View File

@ -1165,7 +1165,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type) for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type)
{ {
GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES: GEN_AST_BODY_CLASS_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry));
return false; return false;
@ -1192,7 +1192,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type) for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type)
{ {
GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES: GEN_AST_BODY_EXPORT_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry));
return false; return false;
@ -1206,7 +1206,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type) for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type)
{ {
GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES: GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry));
return false; return false;
@ -1220,7 +1220,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type) for (Code code_entry = begin_CodeBody(body); code_entry != end_CodeBody(body); next_CodeBody(body, code_entry)) switch (code_entry->Type)
{ {
GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES: GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry));
return false; return false;
@ -1234,7 +1234,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) )switch (entry->Type) for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) )switch (entry->Type)
{ {
GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES: GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry));
return false; return false;
} }
@ -1245,7 +1245,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) ) switch (entry->Type) for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) ) switch (entry->Type)
{ {
GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES: GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry));
return false; return false;
} }
@ -1256,7 +1256,7 @@ bool code_validate_body(Code self)
CodeBody body = cast(CodeBody, self); CodeBody body = cast(CodeBody, self);
for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) ) switch (entry->Type) for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) ) switch (entry->Type)
{ {
GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES: GEN_AST_BODY_STRUCT_UNALLOWED_TYPES:
log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry)); log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry));
return false; return false;
} }

View File

@ -1,6 +1,6 @@
// These macros are used in the swtich cases within ast.cpp, inteface.upfront.cpp, parser.cpp // These macros are used in the swtich cases are used within ast.cpp, inteface.upfront.cpp, parser.cpp
# define GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES \ # define GEN_AST_BODY_CLASS_UNALLOWED_TYPES \
case CT_PlatformAttributes: \ case CT_PlatformAttributes: \
case CT_Class_Body: \ case CT_Class_Body: \
case CT_Enum_Body: \ case CT_Enum_Body: \
@ -16,9 +16,9 @@
case CT_Specifiers: \ case CT_Specifiers: \
case CT_Struct_Body: \ case CT_Struct_Body: \
case CT_Typename case CT_Typename
# define GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES # define GEN_AST_BODY_STRUCT_UNALLOWED_TYPES GEN_AST_BODY_CLASS_UNALLOWED_TYPES
# define GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES \ # define GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES \
case CT_Access_Public: \ case CT_Access_Public: \
case CT_Access_Protected: \ case CT_Access_Protected: \
case CT_Access_Private: \ case CT_Access_Private: \
@ -41,7 +41,7 @@
case CT_Struct_Body: \ case CT_Struct_Body: \
case CT_Typename case CT_Typename
# define GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES \ # define GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES \
case CT_Access_Public: \ case CT_Access_Public: \
case CT_Access_Protected: \ case CT_Access_Protected: \
case CT_Access_Private: \ case CT_Access_Private: \
@ -58,10 +58,10 @@
case CT_Specifiers: \ case CT_Specifiers: \
case CT_Struct_Body: \ case CT_Struct_Body: \
case CT_Typename case CT_Typename
# define GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES # define GEN_AST_BODY_EXPORT_UNALLOWED_TYPES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES
# define GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES # define GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES
# define GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES \ # define GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES \
case CT_Access_Public: \ case CT_Access_Public: \
case CT_Access_Protected: \ case CT_Access_Protected: \
case CT_Access_Private: \ case CT_Access_Private: \

View File

@ -1371,7 +1371,7 @@ void var_to_strbuilder_ref(CodeVar self, StrBuilder* result )
strbuilder_append_str( result, self->Name ); strbuilder_append_str( result, self->Name );
if ( self->ValueType && self->ValueType->ArrExpr ) if ( self->ValueType->ArrExpr )
{ {
strbuilder_append_fmt( result, "[ %SB ]", code_to_strbuilder(self->ValueType->ArrExpr) ); strbuilder_append_fmt( result, "[ %SB ]", code_to_strbuilder(self->ValueType->ArrExpr) );
@ -1454,7 +1454,7 @@ void var_to_strbuilder_ref(CodeVar self, StrBuilder* result )
if ( self->BitfieldSize ) if ( self->BitfieldSize )
strbuilder_append_fmt( result, "%SB %S : %SB", typename_to_strbuilder(self->ValueType), self->Name, code_to_strbuilder(self->BitfieldSize) ); strbuilder_append_fmt( result, "%SB %S : %SB", typename_to_strbuilder(self->ValueType), self->Name, code_to_strbuilder(self->BitfieldSize) );
else if ( self->ValueType && self->ValueType->ArrExpr ) else if ( self->ValueType->ArrExpr )
{ {
strbuilder_append_fmt( result, "%SB %S[ %SB ]", typename_to_strbuilder(self->ValueType), self->Name, code_to_strbuilder(self->ValueType->ArrExpr) ); strbuilder_append_fmt( result, "%SB %S[ %SB ]", typename_to_strbuilder(self->ValueType), self->Name, code_to_strbuilder(self->ValueType->ArrExpr) );

View File

@ -25,22 +25,22 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
# define check_params() \ # define check_params() \
if ( ! params_code ) \ if ( ! params_code ) \
{ \ { \
log_failure("gen::def_operator: params is null and operator %S requires it", operator_to_str(op)); \ log_failure("gen::def_operator: params is null and operator%s requires it", operator_to_str(op)); \
return OpValResult_Fail; \ return OpValResult_Fail; \
} \ } \
if ( params_code->Type != CT_Parameters ) \ if ( params_code->Type != CT_Parameters ) \
{ \ { \
log_failure("gen::def_operator: params is not of Parameters type - %S", code_debug_str( cast(Code, params_code))); \ log_failure("gen::def_operator: params is not of Parameters type - %s", code_debug_str( cast(Code, params_code))); \
return OpValResult_Fail; \ return OpValResult_Fail; \
} }
# define check_param_eq_ret() \ # define check_param_eq_ret() \
if ( ! is_member_symbol && ! code_is_equal(cast(Code, params_code->ValueType), cast(Code, ret_type)) ) \ if ( ! is_member_symbol && ! code_is_equal(cast(Code, params_code->ValueType), cast(Code, ret_type)) ) \
{ \ { \
log_failure("gen::def_operator: operator %S requires first parameter to equal return type\n" \ log_failure("gen::def_operator: operator%s requires first parameter to equal return type\n" \
"param types: %S\n" \ "param types: %s\n" \
"return type: %S", \ "return type: %s", \
operator_to_str(op), \ operator_to_str(op).Ptr, \
code_debug_str(cast(Code, params_code)), \ code_debug_str(cast(Code, params_code)), \
code_debug_str(cast(Code, ret_type)) \ code_debug_str(cast(Code, ret_type)) \
); \ ); \
@ -50,15 +50,12 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
if ( ! ret_type ) if ( ! ret_type )
{ {
log_failure("gen::def_operator: ret_type is null but is required by operator %S", operator_to_str(op)); log_failure("gen::def_operator: ret_type is null but is required by operator%s", operator_to_str(op));
} }
if ( ret_type->Type != CT_Typename ) if ( ret_type->Type != CT_Typename )
{ {
log_failure("gen::def_operator: operator %S - ret_type is not of typename type - %S", log_failure("gen::def_operator: ret_type is not of typename type - %s", code_debug_str(cast(Code, ret_type)));
operator_to_str(op),
code_debug_str(cast(Code, ret_type))
);
return OpValResult_Fail; return OpValResult_Fail;
} }
@ -73,7 +70,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
if ( params_code->NumEntries > 1 ) if ( params_code->NumEntries > 1 )
{ {
log_failure("gen::def_operator: " log_failure("gen::def_operator: "
"operator %S does not support non-member definition (more than one parameter provided) - %S", "operator%s does not support non-member definition (more than one parameter provided) - %s",
operator_to_str(op), operator_to_str(op),
code_debug_str(cast(Code, params_code)) code_debug_str(cast(Code, params_code))
); );
@ -103,7 +100,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
if (params_code->NumEntries > 2 ) if (params_code->NumEntries > 2 )
{ {
log_failure("gen::def_operator: operator %S may not be defined with more than two parametes - param count; %d\n%S" log_failure("gen::def_operator: operator%s may not be defined with more than two parametes - param count; %d\n%s"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
, code_debug_str(cast(Code, params_code)) , code_debug_str(cast(Code, params_code))
@ -119,7 +116,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
{ {
if ( params_code->Type != CT_Parameters ) if ( params_code->Type != CT_Parameters )
{ {
log_failure("gen::def_operator: operator %S params code provided is not of Parameters type - %S" log_failure("gen::def_operator: operator%s params code provided is not of Parameters type - %s"
, operator_to_str(op) , operator_to_str(op)
, code_debug_str(cast(Code, params_code)) , code_debug_str(cast(Code, params_code))
); );
@ -142,7 +139,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
if ( ! code_is_equal((Code)params_get(params_code, 1), (Code)t_int ) ) if ( ! code_is_equal((Code)params_get(params_code, 1), (Code)t_int ) )
{ {
log_failure("gen::def_operator: " log_failure("gen::def_operator: "
"operator %S requires second parameter of non-member definition to be int for post-decrement", "operator%s requires second parameter of non-member definition to be int for post-decrement",
operator_to_str(op) operator_to_str(op)
); );
return OpValResult_Fail; return OpValResult_Fail;
@ -150,7 +147,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
break; break;
default: default:
log_failure("gen::def_operator: operator %S recieved unexpected number of parameters recived %d instead of 0-2" log_failure("gen::def_operator: operator%s recieved unexpected number of parameters recived %d instead of 0-2"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
); );
@ -168,16 +165,16 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
{ {
if ( params_code->Type != CT_Parameters ) if ( params_code->Type != CT_Parameters )
{ {
log_failure("gen::def_operator: params is not of Parameters type - %S", code_debug_str((Code)params_code)); log_failure("gen::def_operator: params is not of Parameters type - %s", code_debug_str((Code)params_code));
return OpValResult_Fail; return OpValResult_Fail;
} }
if ( code_is_equal((Code)params_code->ValueType, (Code)ret_type ) ) if ( code_is_equal((Code)params_code->ValueType, (Code)ret_type ) )
{ {
log_failure("gen::def_operator: " log_failure("gen::def_operator: "
"operator %S is non-member symbol yet first paramter does not equal return type\n" "operator%s is non-member symbol yet first paramter does not equal return type\n"
"param type: %S\n" "param type: %s\n"
"return type: %S\n" "return type: %s\n"
, code_debug_str((Code)params_code) , code_debug_str((Code)params_code)
, code_debug_str((Code)ret_type) , code_debug_str((Code)ret_type)
); );
@ -186,7 +183,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
if ( params_code->NumEntries > 1 ) if ( params_code->NumEntries > 1 )
{ {
log_failure("gen::def_operator: operator %S may not have more than one parameter - param count: %d" log_failure("gen::def_operator: operator%s may not have more than one parameter - param count: %d"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
); );
@ -201,7 +198,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
#if 0 #if 0
if ( ! ret_type.is_equal( t_bool) ) if ( ! ret_type.is_equal( t_bool) )
{ {
log_failure( "gen::def_operator: operator %S return type is not a boolean - %S", operator_to_str(op) code_debug_str(params_code) ); log_failure( "gen::def_operator: return type is not a boolean - %s", code_debug_str(params_code) );
return OpValidateResult::Fail; return OpValidateResult::Fail;
} }
#endif #endif
@ -213,14 +210,14 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
{ {
if ( params_code->Type != CT_Parameters ) if ( params_code->Type != CT_Parameters )
{ {
log_failure( "gen::def_operator: operator %S - params is not of Parameters type - %S", operator_to_str(op), code_debug_str((Code)params_code) ); log_failure( "gen::def_operator: params is not of Parameters type - %s", code_debug_str((Code)params_code) );
return OpValResult_Fail; return OpValResult_Fail;
} }
if ( params_code->NumEntries > 1 ) if ( params_code->NumEntries > 1 )
{ {
log_failure( log_failure(
"gen::def_operator: operator %S may not have more than one parameter - param count: %d", "gen::def_operator: operator%s may not have more than one parameter - param count: %d",
operator_to_str( op ), operator_to_str( op ),
params_code->NumEntries params_code->NumEntries
); );
@ -249,22 +246,21 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
break; break;
case 2: case 2:
// This is allowed for arithemtic operators if ( ! code_is_equal((Code)params_code->ValueType, (Code)ret_type ) )
// if ( ! code_is_equal((Code)params_code->ValueType, (Code)ret_type ) ) {
// { log_failure("gen::def_operator: "
// log_failure("gen::def_operator: " "operator%s is non-member symbol yet first paramter does not equal return type\n"
// "operator %S is non-member symbol yet first paramter does not equal return type\n" "param type: %s\n"
// "param type: %S\n" "return type: %s\n"
// "return type: %S\n" , code_debug_str((Code)params_code)
// , code_debug_str((Code)params_code) , code_debug_str((Code)ret_type)
// , code_debug_str((Code)ret_type) );
// ); return OpValResult_Fail;
// return OpValResult_Fail; }
// }
break; break;
default: default:
log_failure("gen::def_operator: operator %S recieved unexpected number of paramters recived %d instead of 0-2" log_failure("gen::def_operator: operator%s recieved unexpected number of paramters recived %d instead of 0-2"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
); );
@ -280,13 +276,13 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
{ {
if ( params_code->Type != CT_Parameters ) if ( params_code->Type != CT_Parameters )
{ {
log_failure("gen::def_operator: operator %S - params is not of Parameters type - %S", operator_to_str(op), code_debug_str((Code)params_code)); log_failure("gen::def_operator: params is not of Parameters type - %s", code_debug_str((Code)params_code));
return OpValResult_Fail; return OpValResult_Fail;
} }
if ( params_code->NumEntries != 1 ) if ( params_code->NumEntries != 1 )
{ {
log_failure("gen::def_operator: operator %S recieved unexpected number of paramters recived %d instead of 0-1" log_failure("gen::def_operator: operator%s recieved unexpected number of paramters recived %d instead of 0-1"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
); );
@ -296,7 +292,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
if ( ! code_is_equal((Code)ret_type, (Code)t_bool )) if ( ! code_is_equal((Code)ret_type, (Code)t_bool ))
{ {
log_failure("gen::def_operator: operator %S return type must be of type bool - %S" log_failure("gen::def_operator: operator%s return type must be of type bool - %s"
, operator_to_str(op) , operator_to_str(op)
, code_debug_str((Code)ret_type) , code_debug_str((Code)ret_type)
); );
@ -324,7 +320,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
break; break;
default: default:
log_failure("gen::def_operator: operator %S recieved unexpected number of paramters recived %d instead of 1-2" log_failure("gen::def_operator: operator%s recieved unexpected number of paramters recived %d instead of 1-2"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
); );
@ -337,7 +333,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
case Op_MemberOfPointer: case Op_MemberOfPointer:
if ( params_code && params_code->NumEntries > 1) if ( params_code && params_code->NumEntries > 1)
{ {
log_failure("gen::def_operator: operator %S recieved unexpected number of paramters recived %d instead of 0-1" log_failure("gen::def_operator: operator%s recieved unexpected number of paramters recived %d instead of 0-1"
, operator_to_str(op) , operator_to_str(op)
, params_code->NumEntries , params_code->NumEntries
); );
@ -352,7 +348,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy
case Op_PtrToMemOfPtr: case Op_PtrToMemOfPtr:
if ( params_code ) if ( params_code )
{ {
log_failure("gen::def_operator: operator %S expects no paramters - %S", operator_to_str(op), code_debug_str((Code)params_code)); log_failure("gen::def_operator: operator%s expects no paramters - %s", operator_to_str(op), code_debug_str((Code)params_code));
return OpValResult_Fail; return OpValResult_Fail;
} }
break; break;
@ -1364,7 +1360,7 @@ CodeBody def_class_body( s32 num, ... )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES: GEN_AST_BODY_CLASS_UNALLOWED_TYPES:
log_failure("gen::" "def_class_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_class_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1396,7 +1392,7 @@ CodeBody def_class_body( s32 num, Code* codes )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES: GEN_AST_BODY_CLASS_UNALLOWED_TYPES:
log_failure("gen::" "def_class_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_class_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1486,7 +1482,7 @@ CodeBody def_export_body( s32 num, ... )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES: GEN_AST_BODY_EXPORT_UNALLOWED_TYPES:
log_failure("gen::" "def_export_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_export_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1518,7 +1514,7 @@ CodeBody def_export_body( s32 num, Code* codes )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES: GEN_AST_BODY_EXPORT_UNALLOWED_TYPES:
log_failure("gen::" "def_export_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_export_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1552,7 +1548,7 @@ CodeBody def_extern_link_body( s32 num, ... )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES: GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES:
log_failure("gen::" "def_extern_linkage_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_extern_linkage_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1585,7 +1581,7 @@ CodeBody def_extern_link_body( s32 num, Code* codes )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES: GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES:
log_failure("gen::" "def_extern_linkage_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_extern_linkage_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1619,7 +1615,7 @@ CodeBody def_function_body( s32 num, ... )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES: GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES:
log_failure("gen::" stringize(def_function_body) ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" stringize(def_function_body) ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1651,7 +1647,7 @@ CodeBody def_function_body( s32 num, Code* codes )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES: GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES:
log_failure("gen::" "def_function_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_function_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1690,7 +1686,7 @@ CodeBody def_global_body( s32 num, ... )
body_append_body( result, cast(CodeBody, entry) ); body_append_body( result, cast(CodeBody, entry) );
continue; continue;
GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES: GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES:
log_failure("gen::" "def_global_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_global_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1726,7 +1722,7 @@ CodeBody def_global_body( s32 num, Code* codes )
body_append_body(result, cast(CodeBody, entry) ); body_append_body(result, cast(CodeBody, entry) );
continue; continue;
GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES: GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES:
log_failure("gen::" "def_global_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_global_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1761,7 +1757,7 @@ CodeBody def_namespace_body( s32 num, ... )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES: GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES:
log_failure("gen::" "def_namespace_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_namespace_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1793,7 +1789,7 @@ CodeBody def_namespace_body( s32 num, Code* codes )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES: GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES:
log_failure("gen::" "def_namespace_body" ": Entry type is not allowed: %s", code_debug_str(entry) ); log_failure("gen::" "def_namespace_body" ": Entry type is not allowed: %s", code_debug_str(entry) );
return InvalidCode; return InvalidCode;
@ -1938,7 +1934,7 @@ CodeBody def_struct_body( s32 num, ... )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES: GEN_AST_BODY_STRUCT_UNALLOWED_TYPES:
log_failure("gen::" "def_struct_body" ": Entry type is not allowed: %s", code_debug_str(entry)); log_failure("gen::" "def_struct_body" ": Entry type is not allowed: %s", code_debug_str(entry));
return InvalidCode; return InvalidCode;
@ -1970,7 +1966,7 @@ CodeBody def_struct_body( s32 num, Code* codes )
} }
switch (entry->Type) switch (entry->Type)
{ {
GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES: GEN_AST_BODY_STRUCT_UNALLOWED_TYPES:
log_failure("gen::" "def_struct_body" ": Entry type is not allowed: %s", code_debug_str(entry) ); log_failure("gen::" "def_struct_body" ": Entry type is not allowed: %s", code_debug_str(entry) );
return InvalidCode; return InvalidCode;

View File

@ -1,7 +1,6 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES #ifdef GEN_INTELLISENSE_DIRECTIVES
#pragma once #pragma once
#include "gen/etoktype.cpp" #include "gen/etoktype.cpp"
#include "parser_case_macros.cpp"
#include "interface.upfront.cpp" #include "interface.upfront.cpp"
#include "lexer.cpp" #include "lexer.cpp"
#endif #endif
@ -980,7 +979,17 @@ CodeBody parse_class_struct_body( TokType which, Token name )
// <Attributes> // <Attributes>
} }
//! Fallthrough intended //! Fallthrough intended
GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES: case Tok_Spec_Consteval:
case Tok_Spec_Constexpr:
case Tok_Spec_Constinit:
case Tok_Spec_Explicit:
case Tok_Spec_ForceInline:
case Tok_Spec_Inline:
case Tok_Spec_Mutable:
case Tok_Spec_NeverInline:
case Tok_Spec_Static:
case Tok_Spec_Volatile:
case Tok_Spec_Virtual:
{ {
Specifier specs_found[16] = { Spec_NumSpecifiers }; Specifier specs_found[16] = { Spec_NumSpecifiers };
s32 NumSpecifiers = 0; s32 NumSpecifiers = 0;
@ -993,7 +1002,16 @@ CodeBody parse_class_struct_body( TokType which, Token name )
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES: case Spec_Constexpr:
case Spec_Constinit:
case Spec_Explicit:
case Spec_Inline:
case Spec_ForceInline:
case Spec_Mutable:
case Spec_NeverInline:
case Spec_Static:
case Spec_Volatile:
case Spec_Virtual:
break; break;
case Spec_Consteval: case Spec_Consteval:
@ -1005,7 +1023,7 @@ CodeBody parse_class_struct_body( TokType which, Token name )
break; break;
default: default:
log_failure( "Invalid specifier %S for class/struct member\n%S", spec_to_str(spec), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) ); log_failure( "Invalid specifier %S for variable\n%S", spec_to_str(spec), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) );
parser_pop(& _ctx->parser); parser_pop(& _ctx->parser);
return InvalidCode; return InvalidCode;
} }
@ -1497,7 +1515,7 @@ CodeFn parse_function_after_name(
StrBuilder StrBuilder
name_stripped = strbuilder_make_str( _ctx->Allocator_Temp, tok_to_str(name) ); name_stripped = strbuilder_make_str( _ctx->Allocator_Temp, tok_to_str(name) );
strbuilder_strip_space(name_stripped); strip_space(name_stripped);
CodeFn CodeFn
result = (CodeFn) make_code(); result = (CodeFn) make_code();
@ -1774,7 +1792,16 @@ CodeBody parse_global_nspace( CodeType which )
// <Attributes> // <Attributes>
} }
//! Fallthrough intentional //! Fallthrough intentional
GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES: case Tok_Spec_Consteval:
case Tok_Spec_Constexpr:
case Tok_Spec_Constinit:
case Tok_Spec_Extern:
case Tok_Spec_ForceInline:
case Tok_Spec_Global:
case Tok_Spec_Inline:
case Tok_Spec_Internal_Linkage:
case Tok_Spec_NeverInline:
case Tok_Spec_Static:
{ {
Specifier specs_found[16] = { Spec_NumSpecifiers }; Specifier specs_found[16] = { Spec_NumSpecifiers };
s32 NumSpecifiers = 0; s32 NumSpecifiers = 0;
@ -1787,7 +1814,17 @@ CodeBody parse_global_nspace( CodeType which )
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_SPECIFIERS_CASES: case Spec_Constexpr:
case Spec_Constinit:
case Spec_ForceInline:
case Spec_Global:
case Spec_External_Linkage:
case Spec_Internal_Linkage:
case Spec_Inline:
case Spec_Mutable:
case Spec_NeverInline:
case Spec_Static:
case Spec_Volatile:
break; break;
case Spec_Consteval: case Spec_Consteval:
@ -2523,7 +2560,7 @@ Code parse_operator_function_or_variable( bool expects_function, CodeAttributes
#ifndef GEN_PARSER_DISABLE_MACRO_FUNCTION_SIGNATURES #ifndef GEN_PARSER_DISABLE_MACRO_FUNCTION_SIGNATURES
b32 lone_macro = false; b32 lone_macro = false;
if ( currtok.Type == Tok_Preprocess_Macro && ( nexttok.Type == Tok_Statement_End || nexttok.Type == Tok_Comment ) ) if ( currtok.Type == Tok_Preprocess_Macro && nexttok.Type == Tok_Statement_End )
{ {
// Were dealing with a lone macro after attributes/specifiers, there was a end statement ';' after. // Were dealing with a lone macro after attributes/specifiers, there was a end statement ';' after.
result = parse_simple_preprocess( Tok_Preprocess_Macro, parser_consume_braces ); result = parse_simple_preprocess( Tok_Preprocess_Macro, parser_consume_braces );
@ -3934,8 +3971,10 @@ CodeFriend parser_parse_friend()
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES: case Spec_Const :
break; case Spec_Inline :
case Spec_ForceInline :
break;
default : default :
log_failure( "Invalid specifier %S for friend definition\n%S", spec_to_str( spec ), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) ); log_failure( "Invalid specifier %S for friend definition\n%S", spec_to_str( spec ), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) );
@ -4056,7 +4095,14 @@ CodeFn parser_parse_function()
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES: case Spec_Const:
case Spec_Consteval:
case Spec_Constexpr:
case Spec_External_Linkage:
case Spec_ForceInline:
case Spec_Inline:
case Spec_NeverInline:
case Spec_Static:
break; break;
default: default:
@ -4162,7 +4208,12 @@ CodeOperator parser_parse_operator()
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES: case Spec_Const:
case Spec_Constexpr:
case Spec_ForceInline:
case Spec_Inline:
case Spec_NeverInline:
case Spec_Static:
break; break;
default: default:
@ -4400,8 +4451,19 @@ CodeTemplate parser_parse_template()
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES: case Spec_Const :
break; case Spec_Constexpr :
case Spec_Constinit :
case Spec_External_Linkage :
case Spec_Global :
case Spec_Inline :
case Spec_ForceInline :
case Spec_Local_Persist :
case Spec_Mutable :
case Spec_Static :
case Spec_Thread_Local :
case Spec_Volatile :
break;
case Spec_Consteval : case Spec_Consteval :
expects_function = true; expects_function = true;
@ -5447,7 +5509,17 @@ CodeVar parser_parse_variable()
Specifier spec = str_to_specifier( tok_to_str(currtok) ); Specifier spec = str_to_specifier( tok_to_str(currtok) );
switch ( spec ) switch ( spec )
{ {
GEN_PARSER_VARIABLE_ALLOWED_SPECIFIER_CASES: case Spec_Const:
case Spec_Constexpr:
case Spec_Constinit:
case Spec_External_Linkage:
case Spec_Global:
case Spec_Inline:
case Spec_Local_Persist:
case Spec_Mutable:
case Spec_Static:
case Spec_Thread_Local:
case Spec_Volatile:
break; break;
default: default:

View File

@ -1,105 +0,0 @@
// These macros are used in the swtich cases within parser.cpp
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES \
case Tok_Spec_Consteval: \
case Tok_Spec_Constexpr: \
case Tok_Spec_Constinit: \
case Tok_Spec_Explicit: \
case Tok_Spec_ForceInline: \
case Tok_Spec_Inline: \
case Tok_Spec_Mutable: \
case Tok_Spec_NeverInline: \
case Tok_Spec_Static: \
case Tok_Spec_Volatile: \
case Tok_Spec_Virtual
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_Explicit: \
case Spec_Inline: \
case Spec_ForceInline: \
case Spec_Mutable: \
case Spec_NeverInline: \
case Spec_Static: \
case Spec_Volatile: \
case Spec_Virtual
#define GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES \
case Tok_Spec_Consteval: \
case Tok_Spec_Constexpr: \
case Tok_Spec_Constinit: \
case Tok_Spec_Extern: \
case Tok_Spec_ForceInline: \
case Tok_Spec_Global: \
case Tok_Spec_Inline: \
case Tok_Spec_Internal_Linkage: \
case Tok_Spec_NeverInline: \
case Tok_Spec_Static
#define GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_SPECIFIERS_CASES \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_ForceInline: \
case Spec_Global: \
case Spec_External_Linkage: \
case Spec_Internal_Linkage: \
case Spec_Inline: \
case Spec_Mutable: \
case Spec_NeverInline: \
case Spec_Static: \
case Spec_Volatile
#define GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Inline: \
case Spec_ForceInline
#define GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Consteval: \
case Spec_Constexpr: \
case Spec_External_Linkage: \
case Spec_Internal_Linkage: \
case Spec_ForceInline: \
case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_ForceInline: \
case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_External_Linkage: \
case Spec_Global: \
case Spec_Inline: \
case Spec_ForceInline: \
case Spec_Local_Persist: \
case Spec_Mutable: \
case Spec_Static: \
case Spec_Thread_Local: \
case Spec_Volatile
#define GEN_PARSER_VARIABLE_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_External_Linkage: \
case Spec_Global: \
case Spec_Inline: \
case Spec_Local_Persist: \
case Spec_Mutable: \
case Spec_Static: \
case Spec_Thread_Local: \
case Spec_Volatile

View File

@ -6,24 +6,6 @@
#include "gen/especifier.hpp" #include "gen/especifier.hpp"
#endif #endif
enum MacroFlags : u32
{
// Can only be one of these at a time (required)
MF_Block_Start = bit(0), // Start of a "block" scope
MF_Block_End = bit(1), // End of a "block" scope
MF_Case_Statement = bit(2), // Used as a case statement (not utilized by the parser yet)
MF_Expression = bit(3), // Used as an expresssion (not utilized by the parser yet)
MF_Statement = bit(4), // Used a statement (will expect to be a lone macro)
MF_Expects_Body = bit(5), // Expects to consume a braced scope
MF_Typename = bit(6), // Behaves as a typename
// Optional
MF_Functional = bit(7),
MF_Null = 0,
MF_UnderlyingType = GEN_U32_MAX,
};
enum TokFlags : u32 enum TokFlags : u32
{ {
TF_Operator = bit(0), TF_Operator = bit(0),

View File

@ -149,7 +149,7 @@ usize array_grow_formula(ssize value) {
template<class Type> inline template<class Type> inline
bool array_append_array(Array<Type>* array, Array<Type> other) { bool array_append_array(Array<Type>* array, Array<Type> other) {
return array_append_items(array, (Type*)other, array_num(other)); return array_append_items(array, (Type*)other, num(other));
} }
template<class Type> inline template<class Type> inline
@ -179,13 +179,13 @@ bool array_append_items(Array<Type>* array, Type* items, usize item_num)
GEN_ASSERT(* array != nullptr); GEN_ASSERT(* array != nullptr);
GEN_ASSERT(items != nullptr); GEN_ASSERT(items != nullptr);
GEN_ASSERT(item_num > 0); GEN_ASSERT(item_num > 0);
ArrayHeader* header = array_get_header(* array); ArrayHeader* header = array_get_header(array);
if (header->Num + item_num > header->Capacity) if (header->Num + item_num > header->Capacity)
{ {
if ( ! array_grow(array, header->Capacity + item_num)) if ( ! grow(array, header->Capacity + item_num))
return false; return false;
header = array_get_header(* array); header = array_get_header(array);
} }
mem_copy((Type*)array + header->Num, items, item_num * sizeof(Type)); mem_copy((Type*)array + header->Num, items, item_num * sizeof(Type));

View File

@ -599,7 +599,7 @@ void strbuilder_skip_line(StrBuilder str)
} }
inline inline
void strbuilder_strip_space(StrBuilder str) void strip_space(StrBuilder str)
{ {
char* write_pos = str; char* write_pos = str;
char* read_pos = str; char* read_pos = str;

View File

@ -32,7 +32,6 @@ GEN_NS_BEGIN
#include "components/interface.cpp" #include "components/interface.cpp"
#include "components/interface.upfront.cpp" #include "components/interface.upfront.cpp"
#include "components/lexer.cpp" #include "components/lexer.cpp"
#include "components/parser_case_macros.cpp"
#include "components/parser.cpp" #include "components/parser.cpp"
#include "components/interface.parsing.cpp" #include "components/interface.parsing.cpp"
#include "components/interface.untyped.cpp" #include "components/interface.untyped.cpp"

View File

@ -9,7 +9,10 @@ using namespace gen;
CodeBody gen_ecode( char const* path, bool use_c_definition = false ) CodeBody gen_ecode( char const* path, bool use_c_definition = false )
{ {
CSV_Columns2 csv_enum = parse_csv_two_columns( _ctx->Allocator_Temp, path ); FixedArena_32KB scratch; fixed_arena_init(& scratch);
AllocatorInfo scratch_info = fixed_arena_allocator_info(& scratch);
CSV_Columns2 csv_enum = parse_csv_two_columns( scratch_info, path );
StrBuilder enum_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); StrBuilder enum_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) );
StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) );
StrBuilder to_keyword_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); StrBuilder to_keyword_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) );
@ -90,7 +93,10 @@ CodeBody gen_ecode( char const* path, bool use_c_definition = false )
CodeBody gen_eoperator( char const* path, bool use_c_definition = false ) CodeBody gen_eoperator( char const* path, bool use_c_definition = false )
{ {
CSV_Columns2 csv_enum = parse_csv_two_columns( _ctx->Allocator_Temp, path ); FixedArena_16KB scratch; fixed_arena_init(& scratch);
AllocatorInfo scratch_info = fixed_arena_allocator_info(& scratch);
CSV_Columns2 csv_enum = parse_csv_two_columns( scratch_info, path );
StrBuilder enum_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, 32 ); StrBuilder enum_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, 32 );
StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, 32 ); StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, 32 );
@ -172,9 +178,12 @@ CodeBody gen_eoperator( char const* path, bool use_c_definition = false )
CodeBody gen_especifier( char const* path, bool use_c_definition = false ) CodeBody gen_especifier( char const* path, bool use_c_definition = false )
{ {
CSV_Columns2 csv_enum = parse_csv_two_columns( _ctx->Allocator_Temp, path ); FixedArena_16KB scratch; fixed_arena_init(& scratch);
StrBuilder enum_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); AllocatorInfo scratch_info = fixed_arena_allocator_info(& scratch);
StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) );
CSV_Columns2 csv_enum = parse_csv_two_columns( scratch_info, path );
StrBuilder enum_entries = strbuilder_make_reserve( scratch_info, kilobytes(1) );
StrBuilder to_c_str_entries = strbuilder_make_reserve( scratch_info, kilobytes(1) );
for (usize idx = 0; idx < array_num(csv_enum.Col_1); idx++) for (usize idx = 0; idx < array_num(csv_enum.Col_1); idx++)
{ {
@ -308,24 +317,29 @@ CodeBody gen_especifier( char const* path, bool use_c_definition = false )
CodeBody gen_etoktype( char const* etok_path, char const* attr_path, bool use_c_definition = false ) CodeBody gen_etoktype( char const* etok_path, char const* attr_path, bool use_c_definition = false )
{ {
FileContents enum_content = file_read_contents( _ctx->Allocator_Temp, file_zero_terminate, etok_path ); FixedArena_64KB scratch; fixed_arena_init(& scratch);
CSV_Object csv_enum_nodes; AllocatorInfo scratch_info = fixed_arena_allocator_info(& scratch);
csv_parse( &csv_enum_nodes, rcast(char*, enum_content.data), _ctx->Allocator_Temp, false );
FileContents enum_content = file_read_contents( scratch_info, file_zero_terminate, etok_path );
CSV_Object csv_enum_nodes;
csv_parse( &csv_enum_nodes, rcast(char*, enum_content.data), scratch_info, false );
FileContents attrib_content = file_read_contents( scratch_info, file_zero_terminate, attr_path );
FileContents attrib_content = file_read_contents( _ctx->Allocator_Temp, file_zero_terminate, attr_path );
CSV_Object csv_attr_nodes; CSV_Object csv_attr_nodes;
csv_parse( &csv_attr_nodes, rcast(char*, attrib_content.data), _ctx->Allocator_Temp, false ); csv_parse( &csv_attr_nodes, rcast(char*, attrib_content.data), scratch_info, false );
Array<ADT_Node> enum_strs = csv_enum_nodes.nodes[0].nodes; Array<ADT_Node> enum_strs = csv_enum_nodes.nodes[0].nodes;
Array<ADT_Node> enum_c_str_strs = csv_enum_nodes.nodes[1].nodes; Array<ADT_Node> enum_c_str_strs = csv_enum_nodes.nodes[1].nodes;
Array<ADT_Node> attribute_strs = csv_attr_nodes.nodes[0].nodes; Array<ADT_Node> attribute_strs = csv_attr_nodes.nodes[0].nodes;
Array<ADT_Node> attribute_c_str_strs = csv_attr_nodes.nodes[1].nodes; Array<ADT_Node> attribute_c_str_strs = csv_attr_nodes.nodes[1].nodes;
StrBuilder enum_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(2) ); StrBuilder enum_entries = strbuilder_make_reserve( scratch_info, kilobytes(2) );
StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(4) ); StrBuilder to_c_str_entries = strbuilder_make_reserve( scratch_info, kilobytes(4) );
StrBuilder attribute_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(2) ); StrBuilder attribute_entries = strbuilder_make_reserve( scratch_info, kilobytes(2) );
StrBuilder to_c_str_attributes = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(4) ); StrBuilder to_c_str_attributes = strbuilder_make_reserve( scratch_info, kilobytes(4) );
StrBuilder attribute_define_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(4) ); StrBuilder attribute_define_entries = strbuilder_make_reserve( scratch_info, kilobytes(4) );
for (usize idx = 0; idx < array_num(enum_strs); idx++) for (usize idx = 0; idx < array_num(enum_strs); idx++)
{ {

View File

@ -173,12 +173,12 @@
#undef GEN_DEFINE_ATTRIBUTE_TOKENS #undef GEN_DEFINE_ATTRIBUTE_TOKENS
#undef GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES #undef GEN_AST_BODY_CLASS_UNALLOWED_TYPES
#undef GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES #undef GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES
#undef GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES #undef GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES
#undef GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES #undef GEN_AST_BODY_EXPORT_UNALLOWED_TYPES
#undef GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES #undef GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES
#undef GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES #undef GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES
#undef GEN_GLOBAL_BUCKET_SIZE #undef GEN_GLOBAL_BUCKET_SIZE
#undef GEN_CODEPOOL_NUM_BLOCKS #undef GEN_CODEPOOL_NUM_BLOCKS

View File

@ -1247,7 +1247,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
Code src_interface = scan_file( path_base "components/interface.cpp" ); Code src_interface = scan_file( path_base "components/interface.cpp" );
Code src_parsing_interface = scan_file( path_base "components/interface.parsing.cpp" ); Code src_parsing_interface = scan_file( path_base "components/interface.parsing.cpp" );
Code src_untyped = scan_file( path_base "components/interface.untyped.cpp" ); Code src_untyped = scan_file( path_base "components/interface.untyped.cpp" );
Code src_parser_case_macros = scan_file( path_base "components/parser_case_macros.cpp" );
CodeBody parsed_src_ast = parse_file( path_base "components/ast.cpp" ); CodeBody parsed_src_ast = parse_file( path_base "components/ast.cpp" );
CodeBody src_ast = def_body(CT_Global_Body); CodeBody src_ast = def_body(CT_Global_Body);
@ -1501,7 +1500,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
Code r_src_ast_case_macros = refactor(src_ast_case_macros); Code r_src_ast_case_macros = refactor(src_ast_case_macros);
Code r_src_ast = refactor(src_ast); Code r_src_ast = refactor(src_ast);
Code r_src_code_serialization = refactor(src_code_serialization); Code r_src_code_serialization = refactor(src_code_serialization);
Code r_src_parser_case_macros = refactor(src_parser_case_macros);
Code r_src_interface = refactor(src_interface); Code r_src_interface = refactor(src_interface);
Code r_src_upfront = refactor_and_format(src_upfront); Code r_src_upfront = refactor_and_format(src_upfront);
@ -1536,7 +1534,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( r_header_macros ); header.print( r_header_macros );
header.print( header_generic_macros ); header.print( header_generic_macros );
header.print_fmt( "\nGEN_API_C_BEGIN\n" ); header.print_fmt( "GEN_API_C_BEGIN\n" );
header.print( r_header_basic_types ); header.print( r_header_basic_types );
header.print( r_header_debug ); header.print( r_header_debug );
@ -1651,7 +1649,6 @@ R"(#define <interface_name>( code ) _Generic( (code), \
header.print( fmt_newline); header.print( fmt_newline);
header.print( rf_array_code_typename ); header.print( rf_array_code_typename );
header.print( fmt_newline); header.print( fmt_newline);
header.print( r_src_parser_case_macros );
header.print( rf_src_parser ); header.print( rf_src_parser );
header.print( r_src_parsing ); header.print( r_src_parsing );
header.print_fmt( "\n#pragma endregion Parsing\n" ); header.print_fmt( "\n#pragma endregion Parsing\n" );

View File

@ -445,9 +445,6 @@ namespace builder_, gen_builder_
word scan_file, gen_scan_file word scan_file, gen_scan_file
word CSV_Column, gen_CSV_Column
word CSV_Columns2, gen_CSV_Columns2
// Implementation (prviate) // Implementation (prviate)
word _format_info, gen__format_info word _format_info, gen__format_info

View File

@ -193,7 +193,6 @@ int gen_main()
Code interface = scan_file( path_base "components/interface.cpp" ); Code interface = scan_file( path_base "components/interface.cpp" );
Code upfront = scan_file( path_base "components/interface.upfront.cpp" ); Code upfront = scan_file( path_base "components/interface.upfront.cpp" );
Code lexer = scan_file( path_base "components/lexer.cpp" ); Code lexer = scan_file( path_base "components/lexer.cpp" );
Code parser_case_macros = scan_file( path_base "components/parser_case_macros.cpp" );
Code parser = scan_file( path_base "components/parser.cpp" ); Code parser = scan_file( path_base "components/parser.cpp" );
Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" ); Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" );
Code untyped = scan_file( path_base "components/interface.untyped.cpp" ); Code untyped = scan_file( path_base "components/interface.untyped.cpp" );
@ -218,7 +217,6 @@ int gen_main()
builder_print( src, upfront ); builder_print( src, upfront );
builder_print_fmt( src, "\n#pragma region Parsing\n\n" ); builder_print_fmt( src, "\n#pragma region Parsing\n\n" );
builder_print( src, lexer ); builder_print( src, lexer );
builder_print( src, parser_case_macros );
builder_print( src, parser ); builder_print( src, parser );
builder_print( src, parsing_interface ); builder_print( src, parsing_interface );
builder_print_fmt( src, "\n#pragma endregion Parsing\n\n" ); builder_print_fmt( src, "\n#pragma endregion Parsing\n\n" );

View File

@ -210,17 +210,16 @@ int gen_main()
header.print_fmt( roll_own_dependencies_guard_end ); header.print_fmt( roll_own_dependencies_guard_end );
} }
Code static_data = scan_file( path_base "components/static_data.cpp" ); Code static_data = scan_file( path_base "components/static_data.cpp" );
Code ast_case_macros = scan_file( path_base "components/ast_case_macros.cpp" ); Code ast_case_macros = scan_file( path_base "components/ast_case_macros.cpp" );
Code ast = scan_file( path_base "components/ast.cpp" ); Code ast = scan_file( path_base "components/ast.cpp" );
Code code = scan_file( path_base "components/code_serialization.cpp" ); Code code = scan_file( path_base "components/code_serialization.cpp" );
Code interface = scan_file( path_base "components/interface.cpp" ); Code interface = scan_file( path_base "components/interface.cpp" );
Code upfront = scan_file( path_base "components/interface.upfront.cpp" ); Code upfront = scan_file( path_base "components/interface.upfront.cpp" );
Code lexer = scan_file( path_base "components/lexer.cpp" ); Code lexer = scan_file( path_base "components/lexer.cpp" );
Code parser_case_macros = scan_file( path_base "components/parser_case_macros.cpp" ); Code parser = scan_file( path_base "components/parser.cpp" );
Code parser = scan_file( path_base "components/parser.cpp" ); Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" );
Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" ); Code untyped = scan_file( path_base "components/interface.untyped.cpp" );
Code untyped = scan_file( path_base "components/interface.untyped.cpp" );
header.print_fmt( "\nGEN_NS_BEGIN\n"); header.print_fmt( "\nGEN_NS_BEGIN\n");
header.print( static_data ); header.print( static_data );
@ -237,7 +236,6 @@ int gen_main()
header.print( upfront ); header.print( upfront );
header.print_fmt( "\n#pragma region Parsing\n\n" ); header.print_fmt( "\n#pragma region Parsing\n\n" );
header.print( lexer ); header.print( lexer );
header.print( parser_case_macros );
header.print( parser ); header.print( parser );
header.print( parsing_interface ); header.print( parsing_interface );
header.print_fmt( "\n#pragma endregion Parsing\n" ); header.print_fmt( "\n#pragma endregion Parsing\n" );

View File

@ -1,108 +0,0 @@
// These macros are used in the swtich cases within parser.cpp
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES \
case Tok_Spec_Consteval: \
case Tok_Spec_Constexpr: \
case Tok_Spec_Constinit: \
case Tok_Spec_Explicit: \
case Tok_Spec_ForceInline: \
case Tok_Spec_ForceInline_Debuggable: \
case Tok_Spec_Inline: \
case Tok_Spec_Mutable: \
case Tok_Spec_NeverInline: \
case Tok_Spec_Static: \
case Tok_Spec_Volatile: \
case Tok_Spec_Virtual
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_Explicit: \
case Spec_Inline: \
case Spec_ForceInline: \
case Spec_ForceInline_Debuggable: \
case Spec_Mutable: \
case Spec_NeverInline: \
case Spec_Static: \
case Spec_Volatile: \
case Spec_Virtual
#define GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES \
case Tok_Spec_Consteval: \
case Tok_Spec_Constexpr: \
case Tok_Spec_Constinit: \
case Tok_Spec_Extern: \
case Tok_Spec_ForceInline: \
case Tok_Spec_ForceInline_Debuggable: \
case Tok_Spec_Global: \
case Tok_Spec_Inline: \
case Tok_Spec_Internal_Linkage: \
case Tok_Spec_NeverInline: \
case Tok_Spec_Static
#define GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_SPECIFIERS_CASES \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_ForceInline: \
case Spec_ForceInline_Debuggable: \
case Spec_Global: \
case Spec_External_Linkage: \
case Spec_Internal_Linkage: \
case Spec_Inline: \
case Spec_Mutable: \
case Spec_NeverInline: \
case Spec_Static: \
case Spec_Volatile
#define GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Inline: \
case Spec_ForceInline
#define GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Consteval: \
case Spec_Constexpr: \
case Spec_External_Linkage: \
case Spec_Internal_Linkage: \
case Spec_ForceInline: \
case Spec_ForceInline_Debuggable: \
case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_ForceInline: \
case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_External_Linkage: \
case Spec_Global: \
case Spec_Inline: \
case Spec_ForceInline: \
case Spec_ForceInline_Debuggable: \
case Spec_Local_Persist: \
case Spec_Mutable: \
case Spec_Static: \
case Spec_Thread_Local: \
case Spec_Volatile
#define GEN_PARSER_VARIABLE_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_External_Linkage: \
case Spec_Global: \
case Spec_Inline: \
case Spec_Local_Persist: \
case Spec_Mutable: \
case Spec_Static: \
case Spec_Thread_Local: \
case Spec_Volatile

View File

@ -1,27 +0,0 @@
Invalid, INVALID
Consteval, consteval
Constexpr, constexpr
Constinit, constinit
Explicit, explicit
External_Linkage, extern
ForceInline, FORCEINLINE
ForceInline_Debuggable, FORCEINLINE_DEBUGGABLE
Global, global
Inline, inline
Internal_Linkage, internal
Local_Persist, local_persist
Mutable, mutable
NeverInline, neverinline
Ptr, *
Ref, &
Register, register
RValue, &&
Static, static
Thread_Local, thread_local
Virtual, virtual
Const, const
Final, final
NoExceptions, noexcept
Override, override
Pure, = 0
Volatile, volatile
1 Invalid INVALID
2 Consteval consteval
3 Constexpr constexpr
4 Constinit constinit
5 Explicit explicit
6 External_Linkage extern
7 ForceInline FORCEINLINE
8 ForceInline_Debuggable FORCEINLINE_DEBUGGABLE
9 Global global
10 Inline inline
11 Internal_Linkage internal
12 Local_Persist local_persist
13 Mutable mutable
14 NeverInline neverinline
15 Ptr *
16 Ref &
17 Register register
18 RValue &&
19 Static static
20 Thread_Local thread_local
21 Virtual virtual
22 Const const
23 Final final
24 NoExceptions noexcept
25 Override override
26 Pure = 0
27 Volatile volatile

View File

@ -1,96 +0,0 @@
Invalid, "__invalid__"
Access_Private, "private"
Access_Protected, "protected"
Access_Public, "public"
Access_MemberSymbol, "."
Access_StaticSymbol, "::"
Ampersand, "&"
Ampersand_DBL, "&&"
Assign_Classifer, ":"
Attribute_Open, "[["
Attribute_Close, "]]"
BraceCurly_Open, "{"
BraceCurly_Close, "}"
BraceSquare_Open, "["
BraceSquare_Close, "]"
Capture_Start, "("
Capture_End, ")"
Comment, "__comment__"
Comment_End, "__comment_end__"
Comment_Start, "__comment_start__"
Char, "__character__"
Comma, ","
Decl_Class, "class"
Decl_GNU_Attribute, "__attribute__"
Decl_MSVC_Attribute, "__declspec"
Decl_Enum, "enum"
Decl_Extern_Linkage, "extern"
Decl_Friend, "friend"
Decl_Module, "module"
Decl_Namespace, "namespace"
Decl_Operator, "operator"
Decl_Struct, "struct"
Decl_Template, "template"
Decl_Typedef, "typedef"
Decl_Using, "using"
Decl_Union, "union"
Identifier, "__identifier__"
Module_Import, "import"
Module_Export, "export"
NewLine, "__new_line__"
Number, "__number__"
Operator, "__operator__"
Preprocess_Hash, "#"
Preprocess_Define, "define"
Preprocess_If, "if"
Preprocess_IfDef, "ifdef"
Preprocess_IfNotDef, "ifndef"
Preprocess_ElIf, "elif"
Preprocess_Else, "else"
Preprocess_EndIf, "endif"
Preprocess_Include, "include"
Preprocess_Pragma, "pragma"
Preprocess_Content, "__macro_content__"
Preprocess_Macro, "__macro__"
Preprocess_Unsupported, "__unsupported__"
Spec_Alignas, "alignas"
Spec_Const, "const"
Spec_Consteval, "consteval"
Spec_Constexpr, "constexpr"
Spec_Constinit, "constinit"
Spec_Explicit, "explicit"
Spec_Extern, "extern"
Spec_Final, "final"
Spec_ForceInline, "FORCEINLINE"
Spec_ForceInline_Debuggable, "FORCEINLINE_DEBUGGABLE"
Spec_Global, "global"
Spec_Inline, "inline"
Spec_Internal_Linkage, "internal"
Spec_LocalPersist, "local_persist"
Spec_Mutable, "mutable"
Spec_NeverInline, "neverinline"
Spec_Override, "override"
Spec_Static, "static"
Spec_ThreadLocal, "thread_local"
Spec_Volatile, "volatile"
Spec_Virtual, "virtual"
Star, "*"
Statement_End, ";"
StaticAssert, "static_assert"
String, "__string__"
Type_Typename, "typename"
Type_Unsigned, "unsigned"
Type_Signed, "signed"
Type_Short, "short"
Type_Long, "long"
Type_bool, "bool"
Type_char, "char"
Type_int, "int"
Type_double, "double"
Type_MS_int8, "__int8"
Type_MS_int16, "__int16"
Type_MS_int32, "__int32"
Type_MS_int64, "__int64"
Type_MS_W64, "_W64"
Varadic_Argument, "..."
__Attributes_Start, "__attrib_start__"
1 Invalid __invalid__
2 Access_Private private
3 Access_Protected protected
4 Access_Public public
5 Access_MemberSymbol .
6 Access_StaticSymbol ::
7 Ampersand &
8 Ampersand_DBL &&
9 Assign_Classifer :
10 Attribute_Open [[
11 Attribute_Close ]]
12 BraceCurly_Open {
13 BraceCurly_Close }
14 BraceSquare_Open [
15 BraceSquare_Close ]
16 Capture_Start (
17 Capture_End )
18 Comment __comment__
19 Comment_End __comment_end__
20 Comment_Start __comment_start__
21 Char __character__
22 Comma ,
23 Decl_Class class
24 Decl_GNU_Attribute __attribute__
25 Decl_MSVC_Attribute __declspec
26 Decl_Enum enum
27 Decl_Extern_Linkage extern
28 Decl_Friend friend
29 Decl_Module module
30 Decl_Namespace namespace
31 Decl_Operator operator
32 Decl_Struct struct
33 Decl_Template template
34 Decl_Typedef typedef
35 Decl_Using using
36 Decl_Union union
37 Identifier __identifier__
38 Module_Import import
39 Module_Export export
40 NewLine __new_line__
41 Number __number__
42 Operator __operator__
43 Preprocess_Hash #
44 Preprocess_Define define
45 Preprocess_If if
46 Preprocess_IfDef ifdef
47 Preprocess_IfNotDef ifndef
48 Preprocess_ElIf elif
49 Preprocess_Else else
50 Preprocess_EndIf endif
51 Preprocess_Include include
52 Preprocess_Pragma pragma
53 Preprocess_Content __macro_content__
54 Preprocess_Macro __macro__
55 Preprocess_Unsupported __unsupported__
56 Spec_Alignas alignas
57 Spec_Const const
58 Spec_Consteval consteval
59 Spec_Constexpr constexpr
60 Spec_Constinit constinit
61 Spec_Explicit explicit
62 Spec_Extern extern
63 Spec_Final final
64 Spec_ForceInline FORCEINLINE
65 Spec_ForceInline_Debuggable FORCEINLINE_DEBUGGABLE
66 Spec_Global global
67 Spec_Inline inline
68 Spec_Internal_Linkage internal
69 Spec_LocalPersist local_persist
70 Spec_Mutable mutable
71 Spec_NeverInline neverinline
72 Spec_Override override
73 Spec_Static static
74 Spec_ThreadLocal thread_local
75 Spec_Volatile volatile
76 Spec_Virtual virtual
77 Star *
78 Statement_End ;
79 StaticAssert static_assert
80 String __string__
81 Type_Typename typename
82 Type_Unsigned unsigned
83 Type_Signed signed
84 Type_Short short
85 Type_Long long
86 Type_bool bool
87 Type_char char
88 Type_int int
89 Type_double double
90 Type_MS_int8 __int8
91 Type_MS_int16 __int16
92 Type_MS_int32 __int32
93 Type_MS_int64 __int64
94 Type_MS_W64 _W64
95 Varadic_Argument ...
96 __Attributes_Start __attrib_start__

View File

@ -186,13 +186,13 @@ int gen_main()
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" );
CodeBody especifier = gen_especifier( "enums/ESpecifier.csv" ); CodeBody especifier = gen_especifier( path_base "enums/ESpecifier.csv" );
CodeBody ast_inlines = gen_ast_inlines(); CodeBody ast_inlines = gen_ast_inlines();
// Note(Ed): The Attribute tokens need to be expanded and regenerated on a per-project/installation of this library for a specific codebase of Unreal. // Note(Ed): The Attribute tokens need to be expanded and regenerated on a per-project/installation of this library for a specific codebase of Unreal.
// We can support an arbitrary set of modules or plugin apis for parsing // We can support an arbitrary set of modules or plugin apis for parsing
// but its up to the user to define them all (This will just provide whats I've used up till now). // but its up to the user to define them all (This will just provide whats I've used up till now).
CodeBody etoktype = gen_etoktype( "enums/ETokType.csv", "enums/AttributeTokens.csv" ); CodeBody etoktype = gen_etoktype( path_base "enums/ETokType.csv", "enums/AttributeTokens.csv" );
Builder Builder
header = Builder::open( "gen/gen.hpp" ); header = Builder::open( "gen/gen.hpp" );
@ -247,7 +247,6 @@ int gen_main()
Code interface = scan_file( path_base "components/interface.cpp" ); Code interface = scan_file( path_base "components/interface.cpp" );
Code upfront = scan_file( path_base "components/interface.upfront.cpp" ); Code upfront = scan_file( path_base "components/interface.upfront.cpp" );
Code lexer = scan_file( path_base "components/lexer.cpp" ); Code lexer = scan_file( path_base "components/lexer.cpp" );
Code parser_case_macros = scan_file( "components/parser_case_macros.cpp" );
Code parser = scan_file( path_base "components/parser.cpp" ); Code parser = scan_file( path_base "components/parser.cpp" );
Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" ); Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" );
Code untyped = scan_file( path_base "components/interface.untyped.cpp" ); Code untyped = scan_file( path_base "components/interface.untyped.cpp" );
@ -274,7 +273,6 @@ int gen_main()
src.print( upfront ); src.print( upfront );
src.print_fmt( "\n#pragma region Parsing\n\n" ); src.print_fmt( "\n#pragma region Parsing\n\n" );
src.print( lexer ); src.print( lexer );
src.print( parser_case_macros );
src.print( parser ); src.print( parser );
src.print( parsing_interface ); src.print( parsing_interface );
src.print( untyped ); src.print( untyped );

79
gencpp.10x Normal file
View File

@ -0,0 +1,79 @@
<?xml version="1.0"?>
<N10X>
<Workspace>
<IncludeFilter>&amp;apos;.&amp;apos;,**/project/**,</IncludeFilter>
<ExcludeFilter>*.obj,*.lib,*.pch,*.dll,*.pdb,.vs,Debug,Release,x64,obj,*.user,Intermediate,**/sanity.gen.hpp,**/gen_c_library,**/gen_segmented,**/gen_singlheader,**/test,**/gen_unreal_engine,**/scripts,**/docs,</ExcludeFilter>
<SyncFiles>true</SyncFiles>
<Recursive>true</Recursive>
<ShowEmptyFolders>true</ShowEmptyFolders>
<IncludeFilesWithoutExt>false</IncludeFilesWithoutExt>
<IsVirtual>false</IsVirtual>
<IsFolder>false</IsFolder>
<BuildCommand>pwsh ./scripts/build.ps1 msvc debug bootstrap</BuildCommand>
<RebuildCommand>pwsh ./scripts/build.ps1 msvc debug c_library</RebuildCommand>
<BuildFileCommand></BuildFileCommand>
<CleanCommand>pwsh ./scripts/clean.ps1</CleanCommand>
<BuildWorkingDirectory></BuildWorkingDirectory>
<CancelBuild></CancelBuild>
<Exe>./test/gen/build/gencpp.exe</Exe>
<Args></Args>
<WorkingDirectory></WorkingDirectory>
<DebugCommand>pwsh ./scripts/build.ps1</DebugCommand>
<DebugSln></DebugSln>
<UseVisualStudioEnvBat>true</UseVisualStudioEnvBat>
<CaptureExeOutput>false</CaptureExeOutput>
<Configurations>
<Configuration>Debug</Configuration>
<Configuration>Release</Configuration>
<Configuration>bootstrap debug</Configuration>
</Configurations>
<Platforms>
<Platform>x64</Platform>
</Platforms>
<AdditionalIncludePaths>
<AdditionalIncludePath>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt</AdditionalIncludePath>
<AdditionalIncludePath>C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um</AdditionalIncludePath>
</AdditionalIncludePaths>
<Defines>
<Define>GEN_TIME</Define>
<Define>GEN_SYSTEM_WINDOWS</Define>
<Define>GEN_INTELLISENSE_DIRECTIVES</Define>
<Define>GEN_EXECUTION_EXPRESSION_SUPPORT</Define>
<Define>GEN_BENCHMARK</Define>
<Define>GEN_COMPILER_MSVC</Define>
<Define>GEN_IMPLEMENTATION</Define>
</Defines>
<ConfigProperties>
<ConfigAndPlatform>
<Name>Debug:x64</Name>
<Defines></Defines>
<ForceIncludes></ForceIncludes>
</ConfigAndPlatform>
<ConfigAndPlatform>
<Name>bootstrap debug:x64</Name>
<Defines></Defines>
<ForceIncludes></ForceIncludes>
</ConfigAndPlatform>
<Config>
<Name>Debug</Name>
<Defines></Defines>
</Config>
<Config>
<Name>bootstrap debug</Name>
<Defines></Defines>
</Config>
<Platform>
<Name>x64</Name>
<Defines></Defines>
</Platform>
</ConfigProperties>
<Children></Children>
</Workspace>
</N10X>

48
gencpp.sln Normal file
View File

@ -0,0 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33516.290
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencpp", "gencpp.vcxproj", "{53AF600D-C09C-4F39-83E0-E022AA9479F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
bootstrap debug|x64 = bootstrap debug|x64
bootstrap debug|x86 = bootstrap debug|x86
bootstrap release|x64 = bootstrap release|x64
bootstrap release|x86 = bootstrap release|x86
singleheader debug|x64 = singleheader debug|x64
singleheader debug|x86 = singleheader debug|x86
singleheader release|x64 = singleheader release|x64
singleheader release|x86 = singleheader release|x86
test debug|x64 = test debug|x64
test debug|x86 = test debug|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap debug|x64.ActiveCfg = bootstrap release|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap debug|x64.Build.0 = bootstrap release|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap debug|x86.ActiveCfg = bootstrap debug|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap debug|x86.Build.0 = bootstrap debug|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap release|x64.ActiveCfg = bootstrap release|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap release|x86.ActiveCfg = bootstrap release|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.bootstrap release|x86.Build.0 = bootstrap release|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader debug|x64.ActiveCfg = singleheader debug|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader debug|x64.Build.0 = singleheader debug|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader debug|x86.ActiveCfg = singleheader debug|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader debug|x86.Build.0 = singleheader debug|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader release|x64.ActiveCfg = bootstrap debug|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader release|x64.Build.0 = bootstrap debug|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader release|x86.ActiveCfg = singleheader release|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.singleheader release|x86.Build.0 = singleheader release|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.test debug|x64.ActiveCfg = test debug|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.test debug|x64.Build.0 = test debug|x64
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.test debug|x86.ActiveCfg = test debug|Win32
{53AF600D-C09C-4F39-83E0-E022AA9479F2}.test debug|x86.Build.0 = test debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B12D2F1D-037C-44E1-B24B-2612E3DE0193}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:StrBuilder x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=53AF600D_002DC09C_002D4F39_002D83E0_002DE022AA9479F2_002Fd_003Athirdparty_002Ff_003Azpl_002Eh/@EntryIndexedValue">ForceIncluded</s:StrBuilder>
<s:StrBuilder x:Key="/Default/CodeInspection/Highlighting/SweaWarningsMode/@EntryValue">ShowAndRun</s:StrBuilder></wpf:ResourceDictionary>

376
gencpp.vcxproj Normal file
View File

@ -0,0 +1,376 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="bootstrap debug|Win32">
<Configuration>bootstrap debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="bootstrap debug|x64">
<Configuration>bootstrap debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="bootstrap release|Win32">
<Configuration>bootstrap release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="bootstrap release|x64">
<Configuration>bootstrap release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="singleheader debug|Win32">
<Configuration>singleheader debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="singleheader debug|x64">
<Configuration>singleheader debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="singleheader release|Win32">
<Configuration>singleheader release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="singleheader release|x64">
<Configuration>singleheader release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="test debug|Win32">
<Configuration>test debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="test debug|x64">
<Configuration>test debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{53AF600D-C09C-4F39-83E0-E022AA9479F2}</ProjectGuid>
<Keyword>MakeFileProj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='test debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='test debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='test debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='test debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|Win32'">
<NMakeBuildCommandLine>./scripts/build.ps1</NMakeBuildCommandLine>
<NMakeCleanCommandLine>./scripts/clean.ps1</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>./scripts/build.ps1</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='test debug|Win32'">
<NMakeBuildCommandLine>./scripts/build.ps1</NMakeBuildCommandLine>
<NMakeCleanCommandLine>./scripts/clean.ps1</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>./scripts/build.ps1</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|Win32'">
<NMakeBuildCommandLine>./scripts/build.ps1</NMakeBuildCommandLine>
<NMakeCleanCommandLine>./scripts/clean.ps1</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>./scripts/build.ps1</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|Win32'">
<NMakeBuildCommandLine>./scripts/build.ps1</NMakeBuildCommandLine>
<NMakeCleanCommandLine>./scripts/clean.ps1</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>./scripts/build.ps1</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|Win32'">
<NMakeBuildCommandLine>./scripts/build.ps1</NMakeBuildCommandLine>
<NMakeCleanCommandLine>./scripts/clean.ps1</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>./scripts/build.ps1</NMakeReBuildCommandLine>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|x64'">
<NMakeBuildCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\build.ps1" msvc debug bootstrap</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\clean.ps1"</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>GEN_INTELLISENSE_DIRECTIVES;GEN_TIME;GEN_BENCHMARK;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<IncludePath>$(ProjectDir)project;$(IncludePath)</IncludePath>
<SourcePath>$(ProjectDir)project;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='test debug|x64'">
<NMakeBuildCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\build.ps1" msvc debug test</NMakeBuildCommandLine>
<NMakeReBuildCommandLine />
<NMakeCleanCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\clean.ps1"</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>GEN_INTELLISENSE_DIRECTIVES;GEN_TIME;GEN_BENCHMARK;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<IncludePath>$(ProjectDir)project;$(ProjectDir)test;$(IncludePath)</IncludePath>
<SourcePath>$(ProjectDir)project;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|x64'">
<NMakeBuildCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\build.ps1" msvc debug singleheader</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\clean.ps1"</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>GEN_INTELLISENSE_DIRECTIVES;GEN_TIME;GEN_BENCHMARK;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<IncludePath>$(ProjectDir)project;$(ProjectDir)test;$(IncludePath)</IncludePath>
<SourcePath>$(ProjectDir)project;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|x64'">
<NMakeBuildCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\build.ps1" msvc release singleheader</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\clean.ps1"</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>GEN_INTELLISENSE_DIRECTIVES;GEN_TIME;GEN_BENCHMARK;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<IncludePath>$(ProjectDir)project;$(ProjectDir)test;$(IncludePath)</IncludePath>
<SourcePath>$(ProjectDir)project;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|x64'">
<NMakeBuildCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\build.ps1" msvc release bootstrap</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>pwsh.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)scripts\clean.ps1"</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>GEN_INTELLISENSE_DIRECTIVES;GEN_TIME;GEN_BENCHMARK;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<IncludePath>$(ProjectDir)project;$(ProjectDir)test;$(IncludePath)</IncludePath>
<SourcePath>$(ProjectDir)project;$(SourcePath)</SourcePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|x64'">
<ClCompile>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='test debug|x64'">
<ClCompile>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|x64'">
<ClCompile>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|x64'">
<ClCompile>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|x64'">
<ClCompile>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<None Include=".editorconfig" />
<None Include="project\enums\AttributeTokens.csv" />
<None Include="project\enums\ECode.csv" />
<None Include="project\enums\EOperator.csv" />
<None Include="project\enums\ESpecifier.csv" />
<None Include="project\enums\ETokType.csv" />
<None Include="Readme.md" />
<None Include="scripts\.clang-format" />
<None Include="scripts\build.ci.ps1" />
<None Include="scripts\build.ps1" />
<None Include="scripts\clean.ps1" />
<None Include="scripts\genccp.natstepfilter" />
<None Include="scripts\gencpp.refactor" />
<None Include="scripts\helpers\devshell.ps1" />
<None Include="scripts\helpers\target_arch.psm1" />
<None Include="scripts\package_release.ps1" />
<None Include="scripts\refactor.ps1" />
<None Include="test\gen\meson.build" />
<None Include="test\meson.build" />
<None Include="test\Readme.md" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="gen_c_library\gen\gen.h" />
<ClInclude Include="project\auxillary\builder.hpp" />
<ClInclude Include="project\auxillary\editor.hpp" />
<ClInclude Include="project\auxillary\scanner.hpp" />
<ClInclude Include="project\components\ast.hpp" />
<ClInclude Include="project\components\ast_types.hpp" />
<ClInclude Include="project\components\code_types.hpp" />
<ClInclude Include="project\components\gen\ast_inlines.hpp" />
<ClInclude Include="project\components\gen\ecode.hpp" />
<ClInclude Include="project\components\gen\eoperator.hpp" />
<ClInclude Include="project\components\gen\especifier.hpp" />
<ClInclude Include="project\components\header_end.hpp" />
<ClInclude Include="project\components\header_start.hpp" />
<ClInclude Include="project\components\inlines.hpp" />
<ClInclude Include="project\components\interface.hpp" />
<ClInclude Include="project\components\types.hpp" />
<ClInclude Include="project\dependencies\basic_types.hpp" />
<ClInclude Include="project\dependencies\containers.hpp" />
<ClInclude Include="project\dependencies\debug.hpp" />
<ClInclude Include="project\dependencies\filesystem.hpp" />
<ClInclude Include="project\dependencies\hashing.hpp" />
<ClInclude Include="project\dependencies\header_start.hpp" />
<ClInclude Include="project\dependencies\macros.hpp" />
<ClInclude Include="project\dependencies\memory.hpp" />
<ClInclude Include="project\dependencies\parsing.hpp" />
<ClInclude Include="project\dependencies\printing.hpp" />
<ClInclude Include="project\dependencies\strings.hpp" />
<ClInclude Include="project\dependencies\string_ops.hpp" />
<ClInclude Include="project\dependencies\timing.hpp" />
<ClInclude Include="project\gen.dep.hpp" />
<ClInclude Include="project\gen.hpp" />
<ClInclude Include="project\helpers\helper.hpp" />
<ClInclude Include="project\helpers\pop_ignores.inline.hpp" />
<ClInclude Include="project\helpers\push_ignores.inline.hpp" />
<ClInclude Include="project\helpers\undef.macros.hpp" />
<ClInclude Include="singleheader\components\header_start.hpp" />
<ClInclude Include="test\CURSED_TYPEDEF.h" />
<ClInclude Include="test\DummyInclude.hpp" />
<ClInclude Include="test\Parsed\Buffer.Parsed.hpp" />
<ClInclude Include="test\Parsed\HashTable.Parsed.hpp" />
<ClInclude Include="test\Parsed\Ring.Parsed.hpp" />
<ClInclude Include="test\parsing.hpp" />
<ClInclude Include="test\SOA.hpp" />
<ClInclude Include="test\upfront.hpp" />
<ClInclude Include="test\Upfront\Array.Upfront.hpp" />
<ClInclude Include="test\Upfront\Buffer.Upfront.hpp" />
<ClInclude Include="test\Upfront\HashTable.Upfront.hpp" />
<ClInclude Include="test\Upfront\Ring.Upfront.hpp" />
<ClInclude Include="test\Upfront\Sanity.Upfront.hpp" />
<ClInclude Include="test\Parsed\Array.Parsed.hpp" />
<ClInclude Include="test\Parsed\Sanity.Parsed.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="project\auxillary\builder.cpp" />
<ClCompile Include="project\auxillary\scanner.cpp" />
<ClCompile Include="project\bootstrap.cpp" />
<ClCompile Include="project\components\ast.cpp" />
<ClCompile Include="project\components\ast_case_macros.cpp" />
<ClCompile Include="project\components\code_serialization.cpp" />
<ClCompile Include="project\components\gen\etoktype.cpp" />
<ClCompile Include="project\components\interface.cpp" />
<ClCompile Include="project\components\interface.parsing.cpp" />
<ClCompile Include="project\components\interface.untyped.cpp" />
<ClCompile Include="project\components\interface.upfront.cpp" />
<ClCompile Include="project\components\lexer.cpp" />
<ClCompile Include="project\components\parser.cpp" />
<ClCompile Include="project\components\src_start.cpp" />
<ClCompile Include="project\components\static_data.cpp" />
<ClCompile Include="project\dependencies\debug.cpp" />
<ClCompile Include="project\dependencies\filesystem.cpp" />
<ClCompile Include="project\dependencies\hashing.cpp" />
<ClCompile Include="project\dependencies\memory.cpp" />
<ClCompile Include="project\dependencies\parsing.cpp" />
<ClCompile Include="project\dependencies\printing.cpp" />
<ClCompile Include="project\dependencies\src_start.cpp" />
<ClCompile Include="project\dependencies\strings.cpp" />
<ClCompile Include="project\dependencies\string_ops.cpp" />
<ClCompile Include="project\dependencies\timing.cpp" />
<ClCompile Include="project\Example.cpp" />
<ClCompile Include="project\gen.cpp" />
<ClCompile Include="project\gen.dep.cpp" />
<ClCompile Include="singleheader\singleheader.cpp" />
<ClCompile Include="test\parsed\test.parsing.cpp" />
<ClCompile Include="test\parsing.cpp" />
<ClCompile Include="test\sanity.cpp" />
<ClCompile Include="test\SOA.cpp" />
<ClCompile Include="test\test.cpp" />
<ClCompile Include="test\test.parsing.cpp" />
<ClCompile Include="test\test.singleheader_ast.cpp" />
<ClCompile Include="test\test.Upfront.cpp" />
<ClCompile Include="test\upfront.cpp" />
<ClCompile Include="test\upfront\test.upfront.cpp" />
<ClCompile Include="test\validate_bootstrap.cpp" />
<ClCompile Include="test\validate_singleheader.cpp" />
</ItemGroup>
<ItemGroup>
<Natvis Include=".vscode\gencpp.natvis" />
<Natvis Include="scripts\gencpp.natvis" />
</ItemGroup>
<ItemGroup>
<Content Include="project\enums\AttributeTokens.csv" />
<Content Include="project\enums\ECode.csv" />
<Content Include="project\enums\EOperator.csv" />
<Content Include="project\enums\ESpecifier.csv" />
<Content Include="project\enums\ETokType.csv" />
<Content Include="scripts\.clang-format" />
<Content Include="scripts\helpers\devshell.ps1" />
<Content Include="scripts\helpers\target_arch.psm1" />
<Content Include="scripts\refactor.ps1" />
</ItemGroup>
<ItemGroup>
<Folder Include="singleheader\gen\" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

320
gencpp.vcxproj.filters Normal file
View File

@ -0,0 +1,320 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="project\gen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\test.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\test.Upfront.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\gen.dep.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\parsing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\sanity.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\SOA.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\upfront.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\test.parsing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\ast.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\ast_case_macros.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\interface.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\interface.parsing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\interface.upfront.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\src_start.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\static_data.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\bootstrap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\debug.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\filesystem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\hashing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\memory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\parsing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\printing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\src_start.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\string_ops.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\strings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\dependencies\timing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\auxillary\builder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\auxillary\scanner.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="singleheader\singleheader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\test.singleheader_ast.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\parsed\test.parsing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\upfront\test.upfront.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\validate_singleheader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\validate_bootstrap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\interface.untyped.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\gen\etoktype.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\Example.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\parser.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\lexer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="project\components\code_serialization.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="project\gen.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\DummyInclude.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Parsed\Buffer.Parsed.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Parsed\HashTable.Parsed.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Parsed\Ring.Parsed.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\SOA.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Upfront\Array.Upfront.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Upfront\Buffer.Upfront.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Upfront\HashTable.Upfront.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Upfront\Ring.Upfront.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Upfront\Sanity.Upfront.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Parsed\Array.Parsed.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\Parsed\Sanity.Parsed.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\gen.dep.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\parsing.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\upfront.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\ast.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\ast_types.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\header_end.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\header_start.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\inlines.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\interface.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\types.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\helpers\helper.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\helpers\pop_ignores.inline.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\helpers\push_ignores.inline.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\helpers\undef.macros.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\basic_types.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\containers.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\debug.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\filesystem.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\hashing.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\header_start.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\macros.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\memory.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\parsing.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\printing.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\string_ops.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\strings.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\dependencies\timing.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\auxillary\builder.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\auxillary\editor.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\auxillary\scanner.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="singleheader\components\header_start.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\gen\ast_inlines.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\gen\ecode.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\gen\eoperator.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\gen\especifier.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\CURSED_TYPEDEF.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="project\components\code_types.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include=".editorconfig" />
<None Include="Readme.md" />
<None Include="scripts\build.ci.ps1" />
<None Include="scripts\build.ps1" />
<None Include="scripts\clean.ps1" />
<None Include="test\gen\meson.build" />
<None Include="test\meson.build" />
<None Include="test\Readme.md" />
<None Include="scripts\genccp.natstepfilter" />
<None Include="scripts\gencpp.refactor" />
<None Include="project\enums\AttributeTokens.csv" />
<None Include="project\enums\ECode.csv" />
<None Include="project\enums\EOperator.csv" />
<None Include="project\enums\ESpecifier.csv" />
<None Include="project\enums\ETokType.csv" />
<None Include="scripts\helpers\devshell.ps1" />
<None Include="scripts\helpers\target_arch.psm1" />
<None Include="scripts\package_release.ps1" />
<None Include="scripts\refactor.ps1" />
<None Include="scripts\.clang-format" />
</ItemGroup>
<ItemGroup>
<Natvis Include=".vscode\gencpp.natvis" />
<Natvis Include="scripts\gencpp.natvis" />
</ItemGroup>
</Project>

31
gencpp.vcxproj.user Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap debug|x64'">
<LocalDebuggerAttach>false</LocalDebuggerAttach>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>$(ProjectDir)project\build\bootstrap.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='test debug|x64'">
<LocalDebuggerAttach>false</LocalDebuggerAttach>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>$(ProjectDir)project\build\bootstrap.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader debug|x64'">
<LocalDebuggerAttach>false</LocalDebuggerAttach>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>$(ProjectDir)project\build\bootstrap.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='singleheader release|x64'">
<LocalDebuggerAttach>false</LocalDebuggerAttach>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>$(ProjectDir)project\build\bootstrap.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bootstrap release|x64'">
<LocalDebuggerAttach>false</LocalDebuggerAttach>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>$(ProjectDir)project\build\bootstrap.exe</LocalDebuggerCommand>
</PropertyGroup>
</Project>