mirror of
				https://github.com/Ed94/gencpp.git
				synced 2025-10-28 13:30:53 -07:00 
			
		
		
		
	Compare commits
	
		
			9 Commits
		
	
	
		
			v0.22-Alph
			...
			76257123da
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 76257123da | |||
| 3c249d2fae | |||
| 683f13deab | |||
| a7da5f2060 | |||
| db88979b75 | |||
| e04f72ddca | |||
| e8bb381520 | |||
| a33b3644d9 | |||
| 96ffca3094 | 
							
								
								
									
										7
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -32,3 +32,10 @@ test/gen/original | ||||
| singleheader/gen/scratch.hpp | ||||
| test/gen/scratch.cpp | ||||
| gen_c_library/gen | ||||
|  | ||||
| **/*.sln | ||||
| **/*.sln.DotSettings.user | ||||
| **/*.10x | ||||
| **/*.vcxproj | ||||
| **/*.vcxproj.filters | ||||
| **/*.vcxproj.user | ||||
|   | ||||
							
								
								
									
										22
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @@ -73,5 +73,25 @@ | ||||
| 	}, | ||||
| 	"autoHide.autoHidePanel": 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" | ||||
| } | ||||
|   | ||||
| @@ -1165,7 +1165,7 @@ bool code_validate_body(Code 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) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_CLASS_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); | ||||
| 				return false; | ||||
|  | ||||
| @@ -1192,7 +1192,7 @@ bool code_validate_body(Code 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) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_EXPORT_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); | ||||
| 				return false; | ||||
|  | ||||
| @@ -1206,7 +1206,7 @@ bool code_validate_body(Code 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) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); | ||||
| 				return false; | ||||
|  | ||||
| @@ -1220,7 +1220,7 @@ bool code_validate_body(Code 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) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(code_entry)); | ||||
| 				return false; | ||||
|  | ||||
| @@ -1234,7 +1234,7 @@ bool code_validate_body(Code self) | ||||
| 			CodeBody body = cast(CodeBody, self); | ||||
| 			for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) )switch (entry->Type) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry)); | ||||
| 				return false; | ||||
| 			} | ||||
| @@ -1245,7 +1245,7 @@ bool code_validate_body(Code self) | ||||
| 			CodeBody body = cast(CodeBody, self); | ||||
| 			for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) ) switch (entry->Type) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry)); | ||||
| 				return false; | ||||
| 			} | ||||
| @@ -1256,7 +1256,7 @@ bool code_validate_body(Code self) | ||||
| 			CodeBody body = cast(CodeBody, self); | ||||
| 			for ( Code entry = begin_CodeBody(body); entry != end_CodeBody(body); next_CodeBody(body, entry) ) switch (entry->Type) | ||||
| 			{ | ||||
| 				GEN_AST_BODY_STRUCT_UNALLOWED_TYPES: | ||||
| 				GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES: | ||||
| 					log_failure("AST::validate_body: Invalid entry in body %S", code_debug_str(entry)); | ||||
| 				return false; | ||||
| 			} | ||||
|   | ||||
| @@ -26,6 +26,7 @@ struct AST_Constructor; | ||||
| // struct AST_BaseClass; | ||||
| struct AST_Class; | ||||
| struct AST_Define; | ||||
| struct AST_DefineParams; | ||||
| struct AST_Destructor; | ||||
| struct AST_Enum; | ||||
| struct AST_Exec; | ||||
| @@ -98,6 +99,7 @@ typedef AST_Comment*        CodeComment; | ||||
| typedef AST_Class*          CodeClass; | ||||
| typedef AST_Constructor*    CodeConstructor; | ||||
| typedef AST_Define*         CodeDefine; | ||||
| typedef AST_DefineParams*   CodeDefineParams; | ||||
| typedef AST_Destructor*     CodeDestructor; | ||||
| typedef AST_Enum*           CodeEnum; | ||||
| typedef AST_Exec*           CodeExec; | ||||
| @@ -120,6 +122,7 @@ struct CodeComment; | ||||
| struct CodeClass; | ||||
| struct CodeConstructor; | ||||
| struct CodeDefine; | ||||
| struct CodeDefineParams; | ||||
| struct CodeDestructor; | ||||
| struct CodeEnum; | ||||
| struct CodeExec; | ||||
| @@ -305,6 +308,7 @@ struct Code | ||||
| 	operator CodeClass() const; | ||||
| 	operator CodeConstructor() const; | ||||
| 	operator CodeDefine() const; | ||||
| 	operator CodeDefineParams() const; | ||||
| 	operator CodeDestructor() const; | ||||
| 	operator CodeExec() const; | ||||
| 	operator CodeEnum() const; | ||||
| @@ -365,6 +369,7 @@ int AST_ArrSpecs_Cap = | ||||
|  | ||||
| /* | ||||
| 	Simple AST POD with functionality to seralize into C++ syntax. | ||||
| 	TODO(Ed): Eventually haven't a transparent AST like this will longer be viable once statements & expressions are in (most likely....) | ||||
| */ | ||||
| struct AST | ||||
| { | ||||
| @@ -372,7 +377,7 @@ struct AST | ||||
| 		struct | ||||
| 		{ | ||||
| 			Code      InlineCmt;       // Class, Constructor, Destructor, Enum, Friend, Functon, Operator, OpCast, Struct, Typedef, Using, Variable | ||||
| 			Code      Attributes;      // Class, Enum, Function, Struct, Typedef, Union, Using, Variable | ||||
| 			Code      Attributes;      // Class, Enum, Function, Struct, Typedef, Union, Using, Variable // TODO(Ed): Parameters can have attributes | ||||
| 			Code      Specs;           // Destructor, Function, Operator, Typename, Variable | ||||
| 			union { | ||||
| 				Code  InitializerList; // Constructor | ||||
| @@ -384,12 +389,12 @@ struct AST | ||||
| 			union { | ||||
| 				Code  Macro;               // Parameter | ||||
| 				Code  BitfieldSize;        // Variable (Class/Struct Data Member) | ||||
| 				Code  Params;              // Constructor, Function, Operator, Template, Typename | ||||
| 				Code  Params;              // Constructor, Define, Function, Operator, Template, Typename | ||||
| 				Code  UnderlyingTypeMacro; // Enum | ||||
| 			}; | ||||
| 			union { | ||||
| 				Code  ArrExpr;          // Typename | ||||
| 				Code  Body;             // Class, Constructor, Destructor, Enum, Friend, Function, Namespace, Struct, Union | ||||
| 				Code  Body;             // Class, Constructor, Define, Destructor, Enum, Friend, Function, Namespace, Struct, Union | ||||
| 				Code  Declaration;      // Friend, Template | ||||
| 				Code  Value;            // Parameter, Variable | ||||
| 			}; | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| // These macros are used in the swtich cases are used within ast.cpp, inteface.upfront.cpp, parser.cpp | ||||
| // These macros are used in the swtich cases within ast.cpp, inteface.upfront.cpp, parser.cpp | ||||
|  | ||||
| #	define GEN_AST_BODY_CLASS_UNALLOWED_TYPES    \ | ||||
| #	define GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES    \ | ||||
| 	case CT_PlatformAttributes:                  \ | ||||
| 	case CT_Class_Body:                          \ | ||||
| 	case CT_Enum_Body:                           \ | ||||
| @@ -16,9 +16,9 @@ | ||||
| 	case CT_Specifiers:                          \ | ||||
| 	case CT_Struct_Body:                         \ | ||||
| 	case CT_Typename | ||||
| #	define GEN_AST_BODY_STRUCT_UNALLOWED_TYPES GEN_AST_BODY_CLASS_UNALLOWED_TYPES | ||||
| #	define GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES | ||||
|  | ||||
| #	define GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES \ | ||||
| #	define GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES \ | ||||
| 	case CT_Access_Public:                          \ | ||||
| 	case CT_Access_Protected:                       \ | ||||
| 	case CT_Access_Private:                         \ | ||||
| @@ -41,7 +41,7 @@ | ||||
| 	case CT_Struct_Body:                            \ | ||||
| 	case CT_Typename | ||||
|  | ||||
| #	define GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES     \ | ||||
| #	define GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES     \ | ||||
| 	case CT_Access_Public:                         \ | ||||
| 	case CT_Access_Protected:                      \ | ||||
| 	case CT_Access_Private:                        \ | ||||
| @@ -58,10 +58,10 @@ | ||||
| 	case CT_Specifiers:                            \ | ||||
| 	case CT_Struct_Body:                           \ | ||||
| 	case CT_Typename | ||||
| #	define GEN_AST_BODY_EXPORT_UNALLOWED_TYPES         GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES | ||||
| #	define GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES | ||||
| #	define GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES         GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES | ||||
| #	define GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES | ||||
|  | ||||
| #	define GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES \ | ||||
| #	define GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES \ | ||||
| 	case CT_Access_Public:                        \ | ||||
| 	case CT_Access_Protected:                     \ | ||||
| 	case CT_Access_Private:                       \ | ||||
|   | ||||
| @@ -146,9 +146,15 @@ struct AST_Define | ||||
| { | ||||
| 	union { | ||||
| 		char          _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; | ||||
| 		StrCached  Content; | ||||
| 		struct | ||||
| 		{ | ||||
| 			char              _PAD_PROPERTIES_ [ sizeof(AST*) * 4 ]; | ||||
| 			CodeDefineParams  Params; | ||||
| 			Code              Body; // Should be completely serialized for now to a: StrCached Content. | ||||
| 			char              _PAD_PROPERTIES_ [ sizeof(AST*) * 1 ]; | ||||
| 		}; | ||||
| 	}; | ||||
| 	StrCached      Name; | ||||
| 	StrCached         Name; | ||||
| 	Code              Prev; | ||||
| 	Code              Next; | ||||
| 	Token*            Tok; | ||||
| @@ -158,6 +164,22 @@ struct AST_Define | ||||
| }; | ||||
| static_assert( sizeof(AST_Define) == sizeof(AST), "ERROR: AST_Define is not the same size as AST"); | ||||
|  | ||||
| struct AST_DefineParams | ||||
| { | ||||
| 	union { | ||||
| 		char          _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; | ||||
| 	}; | ||||
| 	StrCached         Name; | ||||
| 	CodeDefineParams  Last; | ||||
| 	CodeDefineParams  Next; | ||||
| 	Token*            Tok; | ||||
| 	Code              Parent; | ||||
| 	CodeType          Type; | ||||
| 	char 			  _PAD_UNUSED_[ sizeof(ModuleFlag) ]; | ||||
| 	s32               NumEntries; | ||||
| }; | ||||
| static_assert( sizeof(AST_DefineParams) == sizeof(AST), "ERROR: AST_DefineParams is not the same size as AST"); | ||||
|  | ||||
| struct AST_Destructor | ||||
| { | ||||
| 	union { | ||||
| @@ -660,6 +682,7 @@ struct AST_Params | ||||
| 		char          _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; | ||||
| 		struct | ||||
| 		{ | ||||
| 			// TODO(Ed): Support attributes for parameters (Some prefix macros can be converted to that...) | ||||
| 			char 	     _PAD_PROPERTIES_2_[ sizeof(AST*) * 3 ]; | ||||
| 			CodeTypename ValueType; | ||||
| 			Code         Macro; | ||||
| @@ -668,7 +691,7 @@ struct AST_Params | ||||
| 			// char     _PAD_PROPERTIES_3_[sizeof( AST* )]; | ||||
| 		}; | ||||
| 	}; | ||||
| 	StrCached      Name; | ||||
| 	StrCached         Name; | ||||
| 	CodeParams        Last; | ||||
| 	CodeParams        Next; | ||||
| 	Token*            Tok; | ||||
|   | ||||
| @@ -1371,7 +1371,7 @@ void var_to_strbuilder_ref(CodeVar self, StrBuilder* result ) | ||||
|  | ||||
| 		strbuilder_append_str( result, self->Name ); | ||||
|  | ||||
| 		if ( self->ValueType->ArrExpr ) | ||||
| 		if ( self->ValueType && 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 ) | ||||
| 		strbuilder_append_fmt( result, "%SB %S : %SB", typename_to_strbuilder(self->ValueType), self->Name, code_to_strbuilder(self->BitfieldSize) ); | ||||
|  | ||||
| 	else if ( self->ValueType->ArrExpr ) | ||||
| 	else if ( self->ValueType && self->ValueType->ArrExpr ) | ||||
| 	{ | ||||
| 		strbuilder_append_fmt( result, "%SB %S[ %SB ]", typename_to_strbuilder(self->ValueType), self->Name, code_to_strbuilder(self->ValueType->ArrExpr) ); | ||||
|  | ||||
|   | ||||
| @@ -32,7 +32,17 @@ GEN_API StrBuilder class_to_strbuilder    ( CodeClass self ); | ||||
| GEN_API void       class_to_strbuilder_def( CodeClass self, StrBuilder* result ); | ||||
| GEN_API void       class_to_strbuilder_fwd( CodeClass self, StrBuilder* result ); | ||||
|  | ||||
| GEN_API void       params_append           (CodeParams params, CodeParams param ); | ||||
| GEN_API void             define_params_append           (CodeDefineParams appendee, CodeDefineParams other ); | ||||
| GEN_API CodeDefineParams define_params_get              (CodeDefineParams params, s32 idx); | ||||
| GEN_API bool             define_params_has_entries      (CodeDefineParams params ); | ||||
| GEN_API StrBuilder       define_params_to_strbuilder    (CodeDefineParams params ); | ||||
| GEN_API void             define_params_to_strbuilder_ref(CodeDefineParams params, StrBuilder* result ); | ||||
|  | ||||
| GEN_API CodeDefineParams begin_CodeDefineParams(CodeDefineParams params); | ||||
| GEN_API CodeDefineParams end_CodeDefineParams  (CodeDefineParams params); | ||||
| GEN_API CodeDefineParams next_CodeDefineParams (CodeDefineParams params, CodeDefineParams entry_iter); | ||||
|  | ||||
| GEN_API void       params_append           (CodeParams appendee, CodeParams other ); | ||||
| GEN_API CodeParams params_get              (CodeParams params, s32 idx); | ||||
| GEN_API bool       params_has_entries      (CodeParams params ); | ||||
| GEN_API StrBuilder params_to_strbuilder    (CodeParams params ); | ||||
| @@ -192,12 +202,11 @@ struct CodeParams | ||||
| { | ||||
| #if ! GEN_C_LIKE_CPP | ||||
| 	Using_Code( CodeParams ); | ||||
| 	forceinline void          append( CodeParams other ); | ||||
| 	forceinline CodeParams    get( s32 idx ); | ||||
| 	forceinline bool          has_entries(); | ||||
| 	forceinline StrBuilder    to_strbuilder(); | ||||
| 	forceinline void          to_strbuilder( StrBuilder& result ); | ||||
|  | ||||
| 	forceinline void          append( CodeParams other )          { return params_append(* this, other) } | ||||
| 	forceinline CodeParams    get( s32 idx )                      { return params_get( * this, idx); } | ||||
| 	forceinline bool          has_entries()                       { return params_has_entries(* this); } | ||||
| 	forceinline StrBuilder    to_strbuilder()                     { return params_to_strbuilder(* this); } | ||||
| 	forceinline void          to_strbuilder( StrBuilder& result ) { return params_to_strbuilder_ref(*this, & result); } | ||||
| #endif | ||||
| 	Using_CodeOps( CodeParams ); | ||||
| 	forceinline CodeParams begin() { return begin_CodeParams(* this); } | ||||
| @@ -212,6 +221,29 @@ struct CodeParams | ||||
| 	AST_Params* ast; | ||||
| }; | ||||
|  | ||||
| struct CodeDefineParams | ||||
| { | ||||
| #if ! GEN_C_LIKE_CPP | ||||
| 	Using_Code( CodeDefineParams ); | ||||
| 	forceinline void             append( CodeDefineParams other )    { return params_append( cast(CodeParams, * this), other) } | ||||
| 	forceinline CodeDefineParams get( s32 idx )                      { return params_get( cast(CodeParams, * this), idx); } | ||||
| 	forceinline bool             has_entries()                       { return params_has_entries( cast(CodeParams, * this)); } | ||||
| 	forceinline StrBuilder       to_strbuilder()                     { return define_params_to_strbuilder(* this); } | ||||
| 	forceinline void             to_strbuilder( StrBuilder& result ) { return define_params_to_strbuilder_ref(* this, & result); } | ||||
| #endif | ||||
| 	Using_CodeOps( CodeDefineParams ); | ||||
| 	forceinline CodeDefineParams begin() { return begin_CodeParams( cast(CodeParams, * this)); } | ||||
| 	forceinline CodeDefineParams end()   { return end_CodeParams( cast(CodeParams, * this)); } | ||||
| 	forceinline operator Code() { return { (AST*)ast }; } | ||||
| 	forceinline CodeDefineParams  operator *() { return * this; } // Required to support for-range iteration. | ||||
| 	forceinline AST_DefineParams* operator->() { | ||||
| 		GEN_ASSERT(ast); | ||||
| 		return ast; | ||||
| 	} | ||||
| 	forceinline CodeDefineParams& operator++() { return cast(CodeParams, * this).operator ++() }; | ||||
| 	AST_DefineParams* ast; | ||||
| }; | ||||
|  | ||||
| struct CodeSpecifiers | ||||
| { | ||||
| #if ! GEN_C_LIKE_CPP | ||||
| @@ -941,6 +973,7 @@ struct InvalidCode_ImplictCaster | ||||
|     operator CodeClass         () const { return cast(CodeClass,          Code_Invalid); } | ||||
|     operator CodeConstructor   () const { return cast(CodeConstructor,    Code_Invalid); } | ||||
|     operator CodeDefine        () const { return cast(CodeDefine,         Code_Invalid); } | ||||
|     operator CodeDefineParams  () const { return cast(CodeDefineParams,   Code_Invalid); } | ||||
|     operator CodeDestructor    () const { return cast(CodeDestructor,     Code_Invalid); } | ||||
|     operator CodeExec          () const { return cast(CodeExec,           Code_Invalid); } | ||||
|     operator CodeEnum          () const { return cast(CodeEnum,           Code_Invalid); } | ||||
| @@ -974,6 +1007,7 @@ struct NullCode_ImplicitCaster | ||||
|     operator CodeClass         () const { return {nullptr}; } | ||||
|     operator CodeConstructor   () const { return {nullptr}; } | ||||
|     operator CodeDefine        () const { return {nullptr}; } | ||||
|     operator CodeDefineParams  () const { return {nullptr}; } | ||||
|     operator CodeDestructor    () const { return {nullptr}; } | ||||
|     operator CodeExec          () const { return {nullptr}; } | ||||
|     operator CodeEnum          () const { return {nullptr}; } | ||||
| @@ -1024,17 +1058,23 @@ forceinline StrBuilder to_strbuilder    ( CodeClass self ) | ||||
| forceinline void       to_strbuilder_def( CodeClass self, StrBuilder& result )     { return class_to_strbuilder_def(self, & result); } | ||||
| forceinline void       to_strbuilder_fwd( CodeClass self, StrBuilder& result )     { return class_to_strbuilder_fwd(self, & result); } | ||||
|  | ||||
| forceinline void       append       (CodeParams params, CodeParams param )   { return params_append(params, param); } | ||||
| forceinline CodeParams get          (CodeParams params, s32 idx)             { return params_get(params, idx); } | ||||
| forceinline bool       has_entries  (CodeParams params )                     { return params_has_entries(params); } | ||||
| forceinline StrBuilder to_strbuilder(CodeParams params )                     { return params_to_strbuilder(params); } | ||||
| forceinline void       to_strbuilder(CodeParams params, StrBuilder& result ) { return params_to_strbuilder_ref(params, & result); } | ||||
| forceinline void             append       (CodeDefineParams appendee, CodeDefineParams other ) { return params_append(cast(CodeParam, appendee), other); } | ||||
| forceinline CodeDefineParams get          (CodeDefineParams params, s32 idx)                   { return params_get(cast(CodeParam, params), idx); } | ||||
| forceinline bool             has_entries  (CodeDefineParams params )                           { return params_has_entries(cast(CodeParam, params)); } | ||||
| forceinline StrBuilder       to_strbuilder(CodeDefineParams params )                           { return define_params_to_strbuilder(params); } | ||||
| forceinline void             to_strbuilder(CodeDefineParams params, StrBuilder& result )       { return define_params_to_strbuilder_ref(params, & result); } | ||||
|  | ||||
| forceinline void       append       (CodeParams appendee, CodeParams other )   { return params_append(appendee, other); } | ||||
| forceinline CodeParams get          (CodeParams params, s32 idx)               { return params_get(params, idx); } | ||||
| forceinline bool       has_entries  (CodeParams params )                       { return params_has_entries(params); } | ||||
| forceinline StrBuilder to_strbuilder(CodeParams params )                       { return params_to_strbuilder(params); } | ||||
| forceinline void       to_strbuilder(CodeParams params, StrBuilder& result )   { return params_to_strbuilder_ref(params, & result); } | ||||
|    | ||||
| forceinline bool       append       (CodeSpecifiers specifiers, Specifier spec)       { return specifiers_append(specifiers, spec); } | ||||
| forceinline s32        has          (CodeSpecifiers specifiers, Specifier spec)       { return specifiers_has(specifiers, spec); } | ||||
| forceinline s32        remove       (CodeSpecifiers specifiers, Specifier to_remove ) { return specifiers_remove(specifiers, to_remove); } | ||||
| forceinline StrBuilder to_strbuilder(CodeSpecifiers specifiers)                       { return specifiers_to_strbuilder(specifiers); } | ||||
| forceinline void       to_strbuilder(CodeSpecifiers specifiers, StrBuilder& result)       { return specifiers_to_strbuilder_ref(specifiers, & result);  } | ||||
| forceinline void       to_strbuilder(CodeSpecifiers specifiers, StrBuilder& result)   { return specifiers_to_strbuilder_ref(specifiers, & result);  } | ||||
|  | ||||
| forceinline void       add_interface    (CodeStruct self, CodeTypename interface) { return struct_add_interface(self, interface); } | ||||
| forceinline StrBuilder to_strbuilder    (CodeStruct self)                         { return struct_to_strbuilder(self); } | ||||
|   | ||||
| @@ -257,6 +257,16 @@ CodeParams next_CodeParams(CodeParams params, CodeParams param_iter) | ||||
| } | ||||
| #pragma endregion CodeParams | ||||
|  | ||||
| #pragma region CodeDefineParams | ||||
| forceinline void             define_params_append     (CodeDefineParams appendee, CodeDefineParams other ) { params_append( cast(CodeParams, appendee), cast(CodeParams, other) ); } | ||||
| forceinline CodeDefineParams define_params_get        (CodeDefineParams self, s32 idx )                    { return params_get( cast(CodeParams, self), idx); } | ||||
| forceinline bool             define_params_has_entries(CodeDefineParams self)                              { return params_has_entries( cast(CodeParams, self)); } | ||||
|  | ||||
| CodeDefineParams begin_CodeDefineParams(CodeDefineParams params)                              { return begin_CodeParams( cast(CodeParams, params)); } | ||||
| CodeDefineParams end_CodeDefineParams  (CodeDefineParams params)                              { return end_CodeParams  ( cast(CodeParams, params)); } | ||||
| CodeDefineParams next_CodeDefineParams (CodeDefineParams params, CodeDefineParams entry_iter) { return next_CodeParams ( cast(CodeParams, params), cast(CoeParams, entry_iter)); } | ||||
| #pragma endregion CodeDefineParams | ||||
|  | ||||
| #pragma region CodeSpecifiers | ||||
| inline | ||||
| bool specifiers_append(CodeSpecifiers self, Specifier spec ) | ||||
|   | ||||
| @@ -354,7 +354,7 @@ void deinit(Context* ctx) | ||||
| 	array_free( ctx->CodePools); | ||||
| 	array_free( ctx->StringArenas); | ||||
|  | ||||
| 	arena_free(& ctx->LexArena); | ||||
| 	// arena_free(& ctx->LexArena); | ||||
|  | ||||
| 	array_free(ctx->PreprocessorDefines); | ||||
|  | ||||
| @@ -463,10 +463,12 @@ Code make_code() | ||||
| 	return result; | ||||
| } | ||||
|  | ||||
| void set_preprocess_define( Str id, b32 is_functional ) { | ||||
| 	StrBuilder builder = strbuilder_make_str( _ctx->Allocator_Temp, id ); | ||||
| 	if (is_functional) { | ||||
| 		strbuilder_append_char( & builder, '(' ); | ||||
| 	} | ||||
| 	array_append( _ctx->PreprocessorDefines, cache_str( strbuilder_to_str(builder)) );  | ||||
| PreprocessorMacro* lookup_preprocess_macro( Str name ) { | ||||
| 	u32 key = crc32( name.Ptr, name.Len ); | ||||
| 	return hashtable_get( _ctx->PreprocessorMacros, key ); | ||||
| } | ||||
|  | ||||
| void register_preprocess_macro( PreprocessorMacro macro ) { | ||||
| 	u32 key = crc32( macro.Name.Ptr, macro.Name.Len ); | ||||
| 	hashtable_set( _ctx->PreprocessorMacros, key, macro ); | ||||
| } | ||||
|   | ||||
| @@ -71,7 +71,7 @@ struct Context | ||||
| 	// Used by the lexer to persistently treat all these identifiers as preprocessor defines. | ||||
| 	// Populate with strings via gen::cache_str. | ||||
| 	// Functional defines must have format: id( ;at minimum to indicate that the define is only valid with arguments. | ||||
| 	Array(StrCached) PreprocessorDefines; | ||||
| 	HashTable(PreprocessorMacro) PreprocessorMacros; | ||||
|  | ||||
| // Backend | ||||
|  | ||||
| @@ -88,8 +88,8 @@ struct Context | ||||
|  | ||||
| 	// TODO(Ed): This needs to be just handled by a parser context | ||||
|  | ||||
| 	Arena LexArena; | ||||
| 	StringTable  Lexer_defines; | ||||
| 	// Arena LexArena; | ||||
| 	// StringTable  Lexer_defines; | ||||
| 	Array(Token) Lexer_Tokens; | ||||
|  | ||||
| 	// TODO(Ed): Active parse context vs a parse result need to be separated conceptually | ||||
| @@ -109,9 +109,13 @@ GEN_API void reset(Context* ctx); | ||||
|  | ||||
| GEN_API void set_context(Context* ctx); | ||||
|  | ||||
| // Mostly used to verify a macro entry exists for the given name | ||||
| GEN_API PreprocessMacro* lookup_preprocess_macro( Str Name ); | ||||
|  | ||||
| // Alternative way to add a preprocess define entry for the lexer & parser to utilize  | ||||
| // if the user doesn't want to use def_define | ||||
| GEN_API void set_preprocess_define( Str id, b32 is_functional ); | ||||
| // Macros are tracked by name so if the name already exists the entry will be overwritten. | ||||
| GEN_API void register_preprocess_macro( PreprocessorMacro macro ); | ||||
|  | ||||
| // Used internally to retrive or make string allocations. | ||||
| // Strings are stored in a series of string arenas of fixed size (SizePer_StringArena) | ||||
| @@ -150,9 +154,11 @@ struct Opts_def_constructor { | ||||
| GEN_API CodeConstructor def_constructor( Opts_def_constructor opts GEN_PARAM_DEFAULT ); | ||||
|  | ||||
| struct Opts_def_define { | ||||
| 	b32 dont_append_preprocess_defines; | ||||
| 	MacroFlags       flags; | ||||
| 	CodeDefineParams params; | ||||
| 	b32              dont_register_to_preprocess_macros; | ||||
| }; | ||||
| GEN_API CodeDefine def_define( Str name, Str content, Opts_def_define opts GEN_PARAM_DEFAULT ); | ||||
| GEN_API CodeDefine def_define( Str name, MacroType type, Opts_def_define opts GEN_PARAM_DEFAULT ); | ||||
|  | ||||
| struct Opts_def_destructor { | ||||
| 	Code           body; | ||||
|   | ||||
| @@ -25,22 +25,22 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| #	define check_params()                                                                                                   \ | ||||
| 	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;                                                                                            \ | ||||
| 	}                                                                                                                       \ | ||||
| 	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;                                                                                            \ | ||||
| 	} | ||||
|  | ||||
| #	define check_param_eq_ret()                                                                            \ | ||||
| 	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"        \ | ||||
| 			"param types: %s\n"                                                                            \ | ||||
| 			"return type: %s",                                                                             \ | ||||
| 			operator_to_str(op).Ptr,                                                                       \ | ||||
| 		log_failure("gen::def_operator: operator %S requires first parameter to equal return type\n"       \ | ||||
| 			"param types: %S\n"                                                                            \ | ||||
| 			"return type: %S",                                                                             \ | ||||
| 			operator_to_str(op),                                                                           \ | ||||
| 			code_debug_str(cast(Code, params_code)),                                                       \ | ||||
| 			code_debug_str(cast(Code, ret_type))                                                           \ | ||||
| 		);                                                                                                 \ | ||||
| @@ -50,12 +50,15 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
|  | ||||
| 	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 ) | ||||
| 	{ | ||||
| 		log_failure("gen::def_operator: ret_type is not of typename type - %s", code_debug_str(cast(Code, ret_type))); | ||||
| 		log_failure("gen::def_operator: operator %S - ret_type is not of typename type - %S", | ||||
| 			operator_to_str(op), | ||||
| 			code_debug_str(cast(Code, ret_type)) | ||||
| 		); | ||||
| 		return OpValResult_Fail; | ||||
| 	} | ||||
|  | ||||
| @@ -70,7 +73,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 			if ( params_code->NumEntries > 1 ) | ||||
| 			{ | ||||
| 				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), | ||||
| 					code_debug_str(cast(Code, params_code)) | ||||
| 				); | ||||
| @@ -100,7 +103,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
|  | ||||
| 			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) | ||||
| 					, params_code->NumEntries | ||||
| 					, code_debug_str(cast(Code, params_code)) | ||||
| @@ -116,7 +119,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 			{ | ||||
| 				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) | ||||
| 						, code_debug_str(cast(Code, params_code)) | ||||
| 					); | ||||
| @@ -139,7 +142,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 						if ( ! code_is_equal((Code)params_get(params_code, 1), (Code)t_int ) ) | ||||
| 						{ | ||||
| 							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) | ||||
| 							); | ||||
| 							return OpValResult_Fail; | ||||
| @@ -147,7 +150,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 						break; | ||||
|  | ||||
| 					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) | ||||
| 							, params_code->NumEntries | ||||
| 						); | ||||
| @@ -165,16 +168,16 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 			{ | ||||
| 				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; | ||||
| 				} | ||||
|  | ||||
| 				if ( code_is_equal((Code)params_code->ValueType, (Code)ret_type ) ) | ||||
| 				{ | ||||
| 					log_failure("gen::def_operator: " | ||||
| 						"operator%s is non-member symbol yet first paramter does not equal return type\n" | ||||
| 						"param type: %s\n" | ||||
| 						"return type: %s\n" | ||||
| 						"operator %S is non-member symbol yet first paramter does not equal return type\n" | ||||
| 						"param type: %S\n" | ||||
| 						"return type: %S\n" | ||||
| 						, code_debug_str((Code)params_code) | ||||
| 						, code_debug_str((Code)ret_type) | ||||
| 					); | ||||
| @@ -183,7 +186,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
|  | ||||
| 				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) | ||||
| 						, params_code->NumEntries | ||||
| 					); | ||||
| @@ -198,7 +201,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 		#if 0 | ||||
| 			if ( ! ret_type.is_equal( t_bool) ) | ||||
| 			{ | ||||
| 				log_failure( "gen::def_operator: return type is not a boolean - %s", code_debug_str(params_code) ); | ||||
| 				log_failure( "gen::def_operator: operator %S return type is not a boolean - %S", operator_to_str(op) code_debug_str(params_code) ); | ||||
| 				return OpValidateResult::Fail; | ||||
| 			} | ||||
| 		#endif | ||||
| @@ -210,14 +213,14 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 			{ | ||||
| 				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: operator %S - params is not of Parameters type - %S", operator_to_str(op), code_debug_str((Code)params_code) ); | ||||
| 					return OpValResult_Fail; | ||||
| 				} | ||||
|  | ||||
| 				if ( params_code->NumEntries > 1 ) | ||||
| 				{ | ||||
| 					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 ), | ||||
| 						params_code->NumEntries | ||||
| 					); | ||||
| @@ -246,21 +249,22 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 					break; | ||||
|  | ||||
| 				case 2: | ||||
| 					if ( ! code_is_equal((Code)params_code->ValueType, (Code)ret_type ) ) | ||||
| 					{ | ||||
| 						log_failure("gen::def_operator: " | ||||
| 							"operator%s is non-member symbol yet first paramter does not equal return type\n" | ||||
| 							"param type: %s\n" | ||||
| 							"return type: %s\n" | ||||
| 							, code_debug_str((Code)params_code) | ||||
| 							, code_debug_str((Code)ret_type) | ||||
| 						); | ||||
| 						return OpValResult_Fail; | ||||
| 					} | ||||
| 					// This is allowed for arithemtic operators | ||||
| 					// if ( ! code_is_equal((Code)params_code->ValueType, (Code)ret_type ) ) | ||||
| 					// { | ||||
| 					// 	log_failure("gen::def_operator: " | ||||
| 					// 		"operator %S is non-member symbol yet first paramter does not equal return type\n" | ||||
| 					// 		"param type: %S\n" | ||||
| 					// 		"return type: %S\n" | ||||
| 					// 		, code_debug_str((Code)params_code) | ||||
| 					// 		, code_debug_str((Code)ret_type) | ||||
| 					// 	); | ||||
| 					// 	return OpValResult_Fail; | ||||
| 					// } | ||||
| 					break; | ||||
|  | ||||
| 				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) | ||||
| 						, params_code->NumEntries | ||||
| 					); | ||||
| @@ -276,13 +280,13 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 			{ | ||||
| 				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: operator %S - params is not of Parameters type - %S", operator_to_str(op), code_debug_str((Code)params_code)); | ||||
| 					return OpValResult_Fail; | ||||
| 				} | ||||
|  | ||||
| 				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) | ||||
| 						, params_code->NumEntries | ||||
| 					); | ||||
| @@ -292,7 +296,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
|  | ||||
| 			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) | ||||
| 					, code_debug_str((Code)ret_type) | ||||
| 				); | ||||
| @@ -320,7 +324,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 					break; | ||||
|  | ||||
| 				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) | ||||
| 						, params_code->NumEntries | ||||
| 					); | ||||
| @@ -333,7 +337,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 		case Op_MemberOfPointer: | ||||
| 			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) | ||||
| 					, params_code->NumEntries | ||||
| 				); | ||||
| @@ -348,7 +352,7 @@ OpValidateResult operator__validate( Operator op, CodeParams params_code, CodeTy | ||||
| 		case Op_PtrToMemOfPtr: | ||||
| 			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; | ||||
| 			} | ||||
| 			break; | ||||
| @@ -1360,7 +1364,7 @@ CodeBody def_class_body( s32 num, ... ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_CLASS_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_class_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1392,7 +1396,7 @@ CodeBody def_class_body( s32 num, Code* codes ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_CLASS_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_class_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1482,7 +1486,7 @@ CodeBody def_export_body( s32 num, ... ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_EXPORT_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_export_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1514,7 +1518,7 @@ CodeBody def_export_body( s32 num, Code* codes ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_EXPORT_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_export_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1548,7 +1552,7 @@ CodeBody def_extern_link_body( s32 num, ... ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_extern_linkage_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1581,7 +1585,7 @@ CodeBody def_extern_link_body( s32 num, Code* codes ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_extern_linkage_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1615,7 +1619,7 @@ CodeBody def_function_body( s32 num, ... ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" stringize(def_function_body) ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1647,7 +1651,7 @@ CodeBody def_function_body( s32 num, Code* codes ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_function_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1686,7 +1690,7 @@ CodeBody def_global_body( s32 num, ... ) | ||||
| 				body_append_body( result, cast(CodeBody, entry) ); | ||||
| 				continue; | ||||
|  | ||||
| 			GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_global_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1722,7 +1726,7 @@ CodeBody def_global_body( s32 num, Code* codes ) | ||||
| 				body_append_body(result, cast(CodeBody, entry) ); | ||||
| 				continue; | ||||
|  | ||||
| 			GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_global_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1757,7 +1761,7 @@ CodeBody def_namespace_body( s32 num, ... ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_namespace_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1789,7 +1793,7 @@ CodeBody def_namespace_body( s32 num, Code* codes ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_namespace_body" ": Entry type is not allowed: %s", code_debug_str(entry) ); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1934,7 +1938,7 @@ CodeBody def_struct_body( s32 num, ... ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_STRUCT_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_struct_body" ": Entry type is not allowed: %s", code_debug_str(entry)); | ||||
| 				return InvalidCode; | ||||
|  | ||||
| @@ -1966,7 +1970,7 @@ CodeBody def_struct_body( s32 num, Code* codes ) | ||||
| 		} | ||||
| 		switch (entry->Type) | ||||
| 		{ | ||||
| 			GEN_AST_BODY_STRUCT_UNALLOWED_TYPES: | ||||
| 			GEN_AST_BODY_STRUCT_UNALLOWED_TYPES_CASES: | ||||
| 				log_failure("gen::" "def_struct_body" ": Entry type is not allowed: %s", code_debug_str(entry) ); | ||||
| 				return InvalidCode; | ||||
|  | ||||
|   | ||||
| @@ -221,6 +221,9 @@ s32 lex_preprocessor_directive( LexContext* ctx ) | ||||
| 		name.Text.Len = 1; | ||||
| 		move_forward(); | ||||
|  | ||||
| 		PreprocessorMacro* registered_macro = lookup_preprocess_macro(name.Text); | ||||
| 		 | ||||
|  | ||||
| 		while ( ctx->left && ( char_is_alphanumeric((* ctx->scanner)) || (* ctx->scanner) == '_' ) ) | ||||
| 		{ | ||||
| 			move_forward(); | ||||
| @@ -477,23 +480,24 @@ TokArray lex( Str content ) | ||||
| 		return null_array; | ||||
| 	} | ||||
|  | ||||
| 	for ( StrCached* entry = array_begin(_ctx->PreprocessorDefines); entry != array_end(_ctx->PreprocessorDefines); entry = array_next(_ctx->PreprocessorDefines, entry)) | ||||
| 	{ | ||||
| 		s32         length  = 0; | ||||
| 		char const* entry_scanner = (*entry).Ptr; | ||||
| 		while ( entry->Len > length && (char_is_alphanumeric( *entry_scanner ) || *entry_scanner == '_') ) | ||||
| 		{ | ||||
| 			entry_scanner++; | ||||
| 			length ++; | ||||
| 		} | ||||
| 		if ( entry_scanner[0] == '(' ) | ||||
| 		{ | ||||
| 			length++; | ||||
| 		} | ||||
| 	// TODO(ED): Remove this when preprocess defines has been converted | ||||
| 	// for ( StrCached* entry = array_begin(_ctx->PreprocessorDefines); entry != array_end(_ctx->PreprocessorDefines); entry = array_next(_ctx->PreprocessorDefines, entry)) | ||||
| 	// { | ||||
| 	// 	s32         length  = 0; | ||||
| 	// 	char const* entry_scanner = (*entry).Ptr; | ||||
| 	// 	while ( entry->Len > length && (char_is_alphanumeric( *entry_scanner ) || *entry_scanner == '_') ) | ||||
| 	// 	{ | ||||
| 	// 		entry_scanner++; | ||||
| 	// 		length ++; | ||||
| 	// 	} | ||||
| 	// 	if ( entry_scanner[0] == '(' ) | ||||
| 	// 	{ | ||||
| 	// 		length++; | ||||
| 	// 	} | ||||
|  | ||||
| 		u64 key = crc32( entry->Ptr, length ); | ||||
| 		hashtable_set(c.defines, key, * entry ); | ||||
| 	} | ||||
| 	// 	u64 key = crc32( entry->Ptr, length ); | ||||
| 	// 	hashtable_set(c.defines, key, * entry ); | ||||
| 	// } | ||||
|  | ||||
| 	array_clear(_ctx->Lexer_Tokens); | ||||
|  | ||||
| @@ -1210,8 +1214,6 @@ TokArray lex( Str content ) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	hashtable_clear(_ctx->Lexer_defines); | ||||
| 	// defines_map_arena.free(); | ||||
| 	TokArray result = { _ctx->Lexer_Tokens, 0 }; | ||||
| 	return result; | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| #ifdef GEN_INTELLISENSE_DIRECTIVES | ||||
| #pragma once | ||||
| #include "gen/etoktype.cpp" | ||||
| #include "parser_case_macros.cpp" | ||||
| #include "interface.upfront.cpp" | ||||
| #include "lexer.cpp" | ||||
| #endif | ||||
| @@ -979,17 +980,7 @@ CodeBody parse_class_struct_body( TokType which, Token name ) | ||||
| 				// <Attributes> | ||||
| 			} | ||||
| 			//! Fallthrough intended | ||||
| 			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: | ||||
| 			GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES: | ||||
| 			{ | ||||
| 				Specifier specs_found[16] = { Spec_NumSpecifiers }; | ||||
| 				s32        NumSpecifiers = 0; | ||||
| @@ -1002,16 +993,7 @@ CodeBody parse_class_struct_body( TokType which, Token name ) | ||||
|  | ||||
| 					switch ( spec ) | ||||
| 					{ | ||||
| 						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: | ||||
| 						GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES: | ||||
| 						break; | ||||
|  | ||||
| 						case Spec_Consteval: | ||||
| @@ -1023,7 +1005,7 @@ CodeBody parse_class_struct_body( TokType which, Token name ) | ||||
| 						break; | ||||
|  | ||||
| 						default: | ||||
| 							log_failure( "Invalid specifier %S for variable\n%S", spec_to_str(spec), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) ); | ||||
| 							log_failure( "Invalid specifier %S for class/struct member\n%S", spec_to_str(spec), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) ); | ||||
| 							parser_pop(& _ctx->parser); | ||||
| 							return InvalidCode; | ||||
| 					} | ||||
| @@ -1515,7 +1497,7 @@ CodeFn parse_function_after_name( | ||||
|  | ||||
| 	StrBuilder | ||||
| 	name_stripped = strbuilder_make_str( _ctx->Allocator_Temp, tok_to_str(name) ); | ||||
| 	strip_space(name_stripped); | ||||
| 	strbuilder_strip_space(name_stripped); | ||||
|  | ||||
| 	CodeFn | ||||
| 	result              = (CodeFn) make_code(); | ||||
| @@ -1792,16 +1774,7 @@ CodeBody parse_global_nspace( CodeType which ) | ||||
| 				// <Attributes> | ||||
| 			} | ||||
| 			//! Fallthrough intentional | ||||
| 			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: | ||||
| 			GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_TOK_SPECIFIER_CASES: | ||||
| 			{ | ||||
| 				Specifier specs_found[16] = { Spec_NumSpecifiers }; | ||||
| 				s32        NumSpecifiers = 0; | ||||
| @@ -1814,17 +1787,7 @@ CodeBody parse_global_nspace( CodeType which ) | ||||
|  | ||||
| 					switch ( spec ) | ||||
| 					{ | ||||
| 						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: | ||||
| 						GEN_PARSER_CLASS_GLOBAL_NSPACE_ALLOWED_MEMBER_SPECIFIER_CASES: | ||||
| 						break; | ||||
|  | ||||
| 						case Spec_Consteval: | ||||
| @@ -2560,7 +2523,7 @@ Code parse_operator_function_or_variable( bool expects_function, CodeAttributes | ||||
| #ifndef GEN_PARSER_DISABLE_MACRO_FUNCTION_SIGNATURES | ||||
| 	b32 lone_macro = false; | ||||
|  | ||||
| 	if ( currtok.Type == Tok_Preprocess_Macro && nexttok.Type == Tok_Statement_End ) | ||||
| 	if ( currtok.Type == Tok_Preprocess_Macro && ( nexttok.Type == Tok_Statement_End || nexttok.Type == Tok_Comment ) ) | ||||
| 	{ | ||||
| 		// 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 ); | ||||
| @@ -2724,6 +2687,7 @@ CodeParams parse_params( bool use_template_capture ) | ||||
| 	#define CheckEndParams() \ | ||||
| 		(use_template_capture ? (currtok.Text.Ptr[ 0 ] != '>') : (currtok.Type != Tok_Capture_End)) | ||||
|  | ||||
| 	// TODO(Ed): Use expression macros or this? macro as attribute? | ||||
| 	// Ex: Unreal has this type of macro:                 vvvvvvvvv | ||||
| 	// COREUOBJECT_API void CallFunction( FFrame& Stack, RESULT_DECL, UFunction* Function ); | ||||
| 	// and:                 vvvv | ||||
| @@ -2750,6 +2714,7 @@ CodeParams parse_params( bool use_template_capture ) | ||||
| 			// ( <Macro> <ValueType> <Name> | ||||
| 		} | ||||
|  | ||||
| 		// TODO(Ed): Use expression macro for this? | ||||
| 		// Unreal has yet another type of macro: | ||||
| 		// template<class T UE_REQUIRES(TPointerIsConvertibleFromTo<T, UInterface>::Value)> | ||||
| 		// class T ... and then ^this^ UE_REQUIRES shows up | ||||
| @@ -3971,10 +3936,8 @@ CodeFriend parser_parse_friend() | ||||
|  | ||||
| 			switch ( spec ) | ||||
| 			{ | ||||
| 				case Spec_Const : | ||||
| 				case Spec_Inline : | ||||
| 				case Spec_ForceInline : | ||||
| 					break; | ||||
| 				GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES: | ||||
| 				break; | ||||
|  | ||||
| 				default : | ||||
| 					log_failure( "Invalid specifier %S for friend definition\n%S", spec_to_str( spec ), strbuilder_to_str( parser_to_strbuilder(_ctx->parser)) ); | ||||
| @@ -4095,14 +4058,7 @@ CodeFn parser_parse_function() | ||||
|  | ||||
| 		switch ( spec ) | ||||
| 		{ | ||||
| 			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: | ||||
| 			GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES: | ||||
| 			break; | ||||
|  | ||||
| 			default: | ||||
| @@ -4208,12 +4164,7 @@ CodeOperator parser_parse_operator() | ||||
|  | ||||
| 		switch ( spec ) | ||||
| 		{ | ||||
| 			case Spec_Const: | ||||
| 			case Spec_Constexpr: | ||||
| 			case Spec_ForceInline: | ||||
| 			case Spec_Inline: | ||||
| 			case Spec_NeverInline: | ||||
| 			case Spec_Static: | ||||
| 			GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES: | ||||
| 			break; | ||||
|  | ||||
| 			default: | ||||
| @@ -4451,19 +4402,8 @@ CodeTemplate parser_parse_template() | ||||
|  | ||||
| 				switch ( spec ) | ||||
| 				{ | ||||
| 					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 : | ||||
| 						break; | ||||
| 					GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES: | ||||
| 					break; | ||||
|  | ||||
| 					case Spec_Consteval : | ||||
| 						expects_function = true; | ||||
| @@ -5509,17 +5449,7 @@ CodeVar parser_parse_variable() | ||||
| 		Specifier spec = str_to_specifier( tok_to_str(currtok) ); | ||||
| 		switch  ( spec ) | ||||
| 		{ | ||||
| 			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: | ||||
| 			GEN_PARSER_VARIABLE_ALLOWED_SPECIFIER_CASES: | ||||
| 			break; | ||||
|  | ||||
| 			default: | ||||
|   | ||||
							
								
								
									
										105
									
								
								base/components/parser_case_macros.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								base/components/parser_case_macros.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,105 @@ | ||||
| // 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_SPECIFIER_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_SPECIFIER_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 | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -6,19 +6,49 @@ | ||||
| #include "gen/especifier.hpp" | ||||
| #endif | ||||
|  | ||||
| enum MacroTypes : u16 | ||||
| { | ||||
| 	MT_Block_Start,    // Not Supported yet | ||||
| 	MT_Block_End,      // Not Supported yet | ||||
| 	MT_Case_Statement, // Not Supported yet | ||||
| 	MT_Expression, | ||||
| 	MT_Statement, | ||||
| 	MT_Typename, | ||||
|  | ||||
| 	MF_UnderlyingType = GEN_U16_Max, | ||||
| }; | ||||
|  | ||||
| enum MacroFlags : u16 | ||||
| { | ||||
| 	MF_Functional     = bit(0), // Macro has parameters (args expected to be passed) | ||||
| 	MF_Expects_Body   = bit(1), // Expects to assign a braced scope to its body. | ||||
|  | ||||
| 	MF_Null           = 0, | ||||
| 	MF_UnderlyingType = GEN_U16_Max, | ||||
| }; | ||||
|  | ||||
| struct PreprocessorMacro | ||||
| { | ||||
| 	StrCached  Name; | ||||
| 	MacroTypes Type; | ||||
| 	MacroFlags Flags; | ||||
| }; | ||||
|  | ||||
| enum TokFlags : u32 | ||||
| { | ||||
| 	TF_Operator		   = bit(0), | ||||
| 	TF_Assign          = bit(1), | ||||
| 	TF_Preprocess      = bit(2), | ||||
| 	TF_Preprocess_Cond = bit(3), | ||||
| 	TF_Attribute       = bit(6), | ||||
| 	TF_AccessOperator  = bit( 7 ), | ||||
| 	TF_AccessSpecifier = bit( 8 ), | ||||
| 	TF_Specifier       = bit( 9 ), | ||||
| 	TF_EndDefinition   = bit( 10 ),    // Either ; or } | ||||
| 	TF_Formatting      = bit( 11 ), | ||||
| 	TF_Literal         = bit( 12 ), | ||||
| 	TF_Operator		         = bit(0), | ||||
| 	TF_Assign                = bit(1), | ||||
| 	TF_Preprocess            = bit(2), | ||||
| 	TF_Preprocess_Cond       = bit(3), | ||||
| 	TF_Attribute             = bit(6), | ||||
| 	TF_AccessOperator        = bit(7), | ||||
| 	TF_AccessSpecifier       = bit(8), | ||||
| 	TF_Specifier             = bit(9), | ||||
| 	TF_EndDefinition         = bit(10),    // Either ; or } | ||||
| 	TF_Formatting            = bit(11), | ||||
| 	TF_Literal               = bit(12), | ||||
| 	TF_Macro_Functional      = bit(13), | ||||
| 	TF_Macro_Expects_Body    = bit(14), | ||||
|  | ||||
| 	TF_Null = 0, | ||||
| 	TF_UnderlyingType = GEN_U32_MAX, | ||||
| @@ -105,7 +135,7 @@ struct LexContext | ||||
| 	char const*     scanner; | ||||
| 	s32             line; | ||||
| 	s32             column; | ||||
| 	StringTable     defines; | ||||
| 	// StringTable     defines; | ||||
| 	Token           token; | ||||
| }; | ||||
|  | ||||
|   | ||||
| @@ -149,7 +149,7 @@ usize array_grow_formula(ssize value) { | ||||
|  | ||||
| template<class Type> inline | ||||
| bool array_append_array(Array<Type>* array, Array<Type> other) { | ||||
| 	return array_append_items(array, (Type*)other, num(other)); | ||||
| 	return array_append_items(array, (Type*)other, array_num(other)); | ||||
| } | ||||
|  | ||||
| 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(items != nullptr); | ||||
| 	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 ( ! grow(array, header->Capacity + item_num)) | ||||
| 		if ( ! array_grow(array, header->Capacity + item_num)) | ||||
| 			return false; | ||||
| 		header = array_get_header(array); | ||||
| 		header = array_get_header(* array); | ||||
| 	} | ||||
|  | ||||
| 	mem_copy((Type*)array + header->Num, items, item_num * sizeof(Type)); | ||||
|   | ||||
| @@ -599,7 +599,7 @@ void strbuilder_skip_line(StrBuilder str) | ||||
| } | ||||
|  | ||||
| inline | ||||
| void strip_space(StrBuilder str) | ||||
| void strbuilder_strip_space(StrBuilder str) | ||||
| { | ||||
| 	char* write_pos = str; | ||||
| 	char* read_pos  = str; | ||||
|   | ||||
| @@ -37,6 +37,7 @@ Operator_Member_Fwd, "operator" | ||||
| Operator_Cast,       "operator" | ||||
| Operator_Cast_Fwd,   "operator" | ||||
| Parameters,          "__NA__" | ||||
| Parameters_Define,   "__NA__" | ||||
| Preprocess_Define,   "define" | ||||
| Preprocess_Include,  "include" | ||||
| Preprocess_If,       "if" | ||||
|   | ||||
| 
 | 
| @@ -1,95 +1,97 @@ | ||||
| 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_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__" | ||||
| 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_Expr,      "__macro_expression__" | ||||
| Preprocess_Macro_Stmt,      "__macro_statment__" | ||||
| Preprocess_Macro_Typename,  "__macro_typename__" | ||||
| 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_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__" | ||||
|   | ||||
| 
 | 
| @@ -32,6 +32,7 @@ GEN_NS_BEGIN | ||||
| #include "components/interface.cpp" | ||||
| #include "components/interface.upfront.cpp" | ||||
| #include "components/lexer.cpp" | ||||
| #include "components/parser_case_macros.cpp" | ||||
| #include "components/parser.cpp" | ||||
| #include "components/interface.parsing.cpp" | ||||
| #include "components/interface.untyped.cpp" | ||||
|   | ||||
| @@ -9,10 +9,7 @@ using namespace gen; | ||||
|  | ||||
| CodeBody gen_ecode( char const* path, bool use_c_definition = false ) | ||||
| { | ||||
| 	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 ); | ||||
| 	CSV_Columns2 csv_enum                 = parse_csv_two_columns( _ctx->Allocator_Temp, path ); | ||||
| 	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_keyword_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); | ||||
| @@ -93,10 +90,7 @@ CodeBody gen_ecode( char const* path, bool use_c_definition = false ) | ||||
|  | ||||
| CodeBody gen_eoperator( char const* path, bool use_c_definition = false ) | ||||
| { | ||||
| 	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 ); | ||||
| 	CSV_Columns2 csv_enum       = parse_csv_two_columns( _ctx->Allocator_Temp, path ); | ||||
| 	StrBuilder enum_entries     = strbuilder_make_reserve( _ctx->Allocator_Temp, 32 ); | ||||
| 	StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, 32 ); | ||||
|  | ||||
| @@ -178,12 +172,9 @@ CodeBody gen_eoperator( char const* path, bool use_c_definition = false ) | ||||
|  | ||||
| CodeBody gen_especifier( char const* path, bool use_c_definition = false ) | ||||
| { | ||||
| 	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( scratch_info, kilobytes(1) ); | ||||
| 	StrBuilder to_c_str_entries = strbuilder_make_reserve( scratch_info, kilobytes(1) ); | ||||
| 	CSV_Columns2 csv_enum       = parse_csv_two_columns( _ctx->Allocator_Temp, path ); | ||||
| 	StrBuilder enum_entries     = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); | ||||
| 	StrBuilder to_c_str_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(1) ); | ||||
|  | ||||
| 	for (usize idx = 0; idx < array_num(csv_enum.Col_1); idx++) | ||||
| 	{ | ||||
| @@ -317,29 +308,24 @@ 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 ) | ||||
| { | ||||
| 	FixedArena_64KB scratch;       fixed_arena_init(& scratch); | ||||
| 	AllocatorInfo   scratch_info = fixed_arena_allocator_info(& scratch); | ||||
|  | ||||
| 	FileContents enum_content = file_read_contents( scratch_info, file_zero_terminate, etok_path ); | ||||
|  | ||||
| 	FileContents enum_content = file_read_contents( _ctx->Allocator_Temp, 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 ); | ||||
| 	csv_parse( &csv_enum_nodes, rcast(char*, enum_content.data), _ctx->Allocator_Temp, false ); | ||||
|  | ||||
| 	FileContents attrib_content = file_read_contents( _ctx->Allocator_Temp, file_zero_terminate, attr_path ); | ||||
| 	CSV_Object csv_attr_nodes; | ||||
| 	csv_parse( &csv_attr_nodes, rcast(char*, attrib_content.data), scratch_info, false ); | ||||
| 	csv_parse( &csv_attr_nodes, rcast(char*, attrib_content.data), _ctx->Allocator_Temp, false ); | ||||
|  | ||||
| 	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> attribute_strs       = csv_attr_nodes.nodes[0].nodes; | ||||
| 	Array<ADT_Node> attribute_c_str_strs = csv_attr_nodes.nodes[1].nodes; | ||||
|  | ||||
| 	StrBuilder enum_entries             = strbuilder_make_reserve( scratch_info, kilobytes(2) ); | ||||
| 	StrBuilder to_c_str_entries         = strbuilder_make_reserve( scratch_info, kilobytes(4) ); | ||||
| 	StrBuilder attribute_entries        = strbuilder_make_reserve( scratch_info, kilobytes(2) ); | ||||
| 	StrBuilder to_c_str_attributes      = strbuilder_make_reserve( scratch_info, kilobytes(4) ); | ||||
| 	StrBuilder attribute_define_entries = strbuilder_make_reserve( scratch_info, kilobytes(4) ); | ||||
| 	StrBuilder enum_entries             = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(2) ); | ||||
| 	StrBuilder to_c_str_entries         = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(4) ); | ||||
| 	StrBuilder attribute_entries        = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(2) ); | ||||
| 	StrBuilder to_c_str_attributes      = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(4) ); | ||||
| 	StrBuilder attribute_define_entries = strbuilder_make_reserve( _ctx->Allocator_Temp, kilobytes(4) ); | ||||
|  | ||||
| 	for (usize idx = 0; idx < array_num(enum_strs); idx++) | ||||
| 	{ | ||||
|   | ||||
| @@ -173,12 +173,12 @@ | ||||
|  | ||||
| #undef GEN_DEFINE_ATTRIBUTE_TOKENS | ||||
|  | ||||
| #undef GEN_AST_BODY_CLASS_UNALLOWED_TYPES | ||||
| #undef GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES | ||||
| #undef GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES | ||||
| #undef GEN_AST_BODY_EXPORT_UNALLOWED_TYPES | ||||
| #undef GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES | ||||
| #undef GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES | ||||
| #undef GEN_AST_BODY_CLASS_UNALLOWED_TYPES_CASES | ||||
| #undef GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES_CASES | ||||
| #undef GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES_CASES | ||||
| #undef GEN_AST_BODY_EXPORT_UNALLOWED_TYPES_CASES | ||||
| #undef GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES_CASES | ||||
| #undef GEN_AST_BODY_NAMESPACE_UNALLOWED_TYPES_CASES | ||||
|  | ||||
| #undef GEN_GLOBAL_BUCKET_SIZE | ||||
| #undef GEN_CODEPOOL_NUM_BLOCKS | ||||
|   | ||||
| @@ -1247,6 +1247,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \ | ||||
| 	Code src_interface          = scan_file( path_base "components/interface.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_parser_case_macros = scan_file( path_base "components/parser_case_macros.cpp" ); | ||||
|  | ||||
| 	CodeBody parsed_src_ast = parse_file( path_base "components/ast.cpp" ); | ||||
| 	CodeBody src_ast        = def_body(CT_Global_Body); | ||||
| @@ -1466,7 +1467,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \ | ||||
| 	Code rf_header_parsing     = refactor_and_format(header_parsing); | ||||
|  | ||||
| 	Code rf_types        = refactor_and_format(types); | ||||
| 	Code rf_parser_types = refactor_and_format(parser_types);  | ||||
| 	Code rf_parser_types = refactor_and_format(parser_types); | ||||
| 	Code rf_ecode        = refactor_and_format(ecode); | ||||
| 	Code rf_eoperator    = refactor_and_format(eoperator); | ||||
| 	Code rf_especifier   = refactor_and_format(especifier); | ||||
| @@ -1500,6 +1501,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \ | ||||
| 	Code r_src_ast_case_macros    = refactor(src_ast_case_macros); | ||||
| 	Code r_src_ast                = refactor(src_ast); | ||||
| 	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_upfront          = refactor_and_format(src_upfront); | ||||
| @@ -1534,7 +1536,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \ | ||||
| 		header.print( r_header_macros ); | ||||
| 		header.print( header_generic_macros ); | ||||
|  | ||||
| 		header.print_fmt( "GEN_API_C_BEGIN\n" ); | ||||
| 		header.print_fmt( "\nGEN_API_C_BEGIN\n" ); | ||||
|  | ||||
| 		header.print( r_header_basic_types ); | ||||
| 		header.print( r_header_debug ); | ||||
| @@ -1649,6 +1651,7 @@ R"(#define <interface_name>( code ) _Generic( (code), \ | ||||
| 		header.print( fmt_newline); | ||||
| 		header.print( rf_array_code_typename ); | ||||
| 		header.print( fmt_newline); | ||||
| 		header.print( r_src_parser_case_macros ); | ||||
| 		header.print( rf_src_parser ); | ||||
| 		header.print( r_src_parsing ); | ||||
| 		header.print_fmt( "\n#pragma endregion Parsing\n" ); | ||||
|   | ||||
| @@ -350,6 +350,8 @@ word CodeVar,            gen_CodeVar | ||||
|  | ||||
| // Code Interface | ||||
|  | ||||
| word Context, gen_Context | ||||
|  | ||||
| namespace code_, gen_code_ | ||||
|  | ||||
| word Code_Global,  gen_Code_Global | ||||
| @@ -443,6 +445,9 @@ namespace builder_, gen_builder_ | ||||
|  | ||||
| word scan_file, gen_scan_file | ||||
|  | ||||
| word CSV_Column,   gen_CSV_Column | ||||
| word CSV_Columns2, gen_CSV_Columns2 | ||||
|  | ||||
| // Implementation (prviate) | ||||
|  | ||||
| word _format_info, gen__format_info | ||||
|   | ||||
| @@ -7,12 +7,13 @@ void convert_cpp_enum_to_c( CodeEnum to_convert, CodeBody to_append ) | ||||
| { | ||||
| #pragma push_macro("enum_underlying") | ||||
| #undef enum_underlying | ||||
| 	StrCached type = to_convert->UnderlyingType ? to_convert->UnderlyingType : to_convert->Name | ||||
| 	CodeTypedef tdef = parse_typedef(token_fmt("type", type, "name", to_convert->Name, stringize( typedef enum <type> <name>; ))); | ||||
| 	if (to_convert->UnderlyingType) | ||||
| 	{ | ||||
| 		to_convert->UnderlyingTypeMacro = untyped_str(token_fmt("type", to_convert->UnderlyingType->Name, stringize(enum_underlying(<type>)))); | ||||
| 		to_convert->UnderlyingType      = CodeTypename{nullptr}; | ||||
| 	} | ||||
| 	CodeTypedef tdef = parse_typedef(token_fmt("name", to_convert->Name, stringize( typedef enum <name> <name>; ))); | ||||
| 	to_append.append(to_convert); | ||||
| 	to_append.append(tdef); | ||||
| #pragma pop_macro("enum_underlying") | ||||
|   | ||||
| @@ -193,6 +193,7 @@ int gen_main() | ||||
| 		Code        interface	       = scan_file( path_base "components/interface.cpp" ); | ||||
| 		Code        upfront 	       = scan_file( path_base "components/interface.upfront.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 	    parsing_interface  = scan_file( path_base "components/interface.parsing.cpp" ); | ||||
| 		Code        untyped 	       = scan_file( path_base "components/interface.untyped.cpp" ); | ||||
| @@ -217,6 +218,7 @@ int gen_main() | ||||
| 		builder_print( src, upfront ); | ||||
| 		builder_print_fmt( src, "\n#pragma region Parsing\n\n" ); | ||||
| 		builder_print( src, lexer ); | ||||
| 		builder_print( src, parser_case_macros ); | ||||
| 		builder_print( src, parser ); | ||||
| 		builder_print( src, parsing_interface ); | ||||
| 		builder_print_fmt( src, "\n#pragma endregion Parsing\n\n" ); | ||||
|   | ||||
| @@ -210,16 +210,17 @@ int gen_main() | ||||
| 			header.print_fmt( roll_own_dependencies_guard_end ); | ||||
| 		} | ||||
|  | ||||
| 		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               = scan_file( path_base "components/ast.cpp" ); | ||||
| 		Code code              = scan_file( path_base "components/code_serialization.cpp" ); | ||||
| 		Code interface         = scan_file( path_base "components/interface.cpp" ); | ||||
| 		Code upfront           = scan_file( path_base "components/interface.upfront.cpp" ); | ||||
| 		Code lexer             = scan_file( path_base "components/lexer.cpp" ); | ||||
| 		Code parser            = scan_file( path_base "components/parser.cpp" ); | ||||
| 		Code parsing_interface = scan_file( path_base "components/interface.parsing.cpp" ); | ||||
| 		Code untyped           = scan_file( path_base "components/interface.untyped.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                = scan_file( path_base "components/ast.cpp" ); | ||||
| 		Code code               = scan_file( path_base "components/code_serialization.cpp" ); | ||||
| 		Code interface          = scan_file( path_base "components/interface.cpp" ); | ||||
| 		Code upfront            = scan_file( path_base "components/interface.upfront.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 parsing_interface  = scan_file( path_base "components/interface.parsing.cpp" ); | ||||
| 		Code untyped            = scan_file( path_base "components/interface.untyped.cpp" ); | ||||
|  | ||||
| 		header.print_fmt( "\nGEN_NS_BEGIN\n"); | ||||
| 		header.print( static_data ); | ||||
| @@ -236,6 +237,7 @@ int gen_main() | ||||
| 		header.print( upfront ); | ||||
| 		header.print_fmt( "\n#pragma region Parsing\n\n" ); | ||||
| 		header.print( lexer ); | ||||
| 		header.print( parser_case_macros ); | ||||
| 		header.print( parser ); | ||||
| 		header.print( parsing_interface ); | ||||
| 		header.print_fmt( "\n#pragma endregion Parsing\n" ); | ||||
|   | ||||
							
								
								
									
										108
									
								
								gen_unreal_engine/components/parser_case_macros.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								gen_unreal_engine/components/parser_case_macros.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,108 @@ | ||||
| // 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_SPECIFIER_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_SPECIFIER_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 | ||||
							
								
								
									
										27
									
								
								gen_unreal_engine/enums/ESpecifier.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								gen_unreal_engine/enums/ESpecifier.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| 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 | ||||
| 
 | 
							
								
								
									
										96
									
								
								gen_unreal_engine/enums/ETokType.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								gen_unreal_engine/enums/ETokType.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| 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__" | ||||
| 
 | 
| @@ -186,13 +186,13 @@ int gen_main() | ||||
|  | ||||
| 		CodeBody ecode       = gen_ecode     ( path_base "enums/ECodeTypes.csv" ); | ||||
| 		CodeBody eoperator   = gen_eoperator ( path_base "enums/EOperator.csv" ); | ||||
| 		CodeBody especifier  = gen_especifier( path_base "enums/ESpecifier.csv" ); | ||||
| 		CodeBody especifier  = gen_especifier(           "enums/ESpecifier.csv" ); | ||||
| 		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. | ||||
| 		// 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). | ||||
| 		CodeBody etoktype = gen_etoktype( path_base "enums/ETokType.csv", "enums/AttributeTokens.csv" ); | ||||
| 		CodeBody etoktype = gen_etoktype( "enums/ETokType.csv", "enums/AttributeTokens.csv" ); | ||||
|  | ||||
| 		Builder | ||||
| 		header = Builder::open( "gen/gen.hpp" ); | ||||
| @@ -247,6 +247,7 @@ int gen_main() | ||||
| 		Code        interface	       = scan_file( path_base "components/interface.cpp" ); | ||||
| 		Code        upfront 	       = scan_file( path_base "components/interface.upfront.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 	    parsing_interface  = scan_file( path_base "components/interface.parsing.cpp" ); | ||||
| 		Code        untyped 	       = scan_file( path_base "components/interface.untyped.cpp" ); | ||||
| @@ -273,6 +274,7 @@ int gen_main() | ||||
| 		src.print( upfront ); | ||||
| 		src.print_fmt( "\n#pragma region Parsing\n\n" ); | ||||
| 		src.print( lexer ); | ||||
| 		src.print( parser_case_macros ); | ||||
| 		src.print( parser ); | ||||
| 		src.print( parsing_interface ); | ||||
| 		src.print( untyped ); | ||||
|   | ||||
							
								
								
									
										79
									
								
								gencpp.10x
									
									
									
									
									
								
							
							
						
						
									
										79
									
								
								gencpp.10x
									
									
									
									
									
								
							| @@ -1,79 +0,0 @@ | ||||
| <?xml version="1.0"?> | ||||
| <N10X> | ||||
| 	<Workspace> | ||||
| 		<IncludeFilter>&apos;.&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
									
									
									
									
									
								
							
							
						
						
									
										48
									
								
								gencpp.sln
									
									
									
									
									
								
							| @@ -1,48 +0,0 @@ | ||||
|  | ||||
| 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 | ||||
| @@ -1,3 +0,0 @@ | ||||
| <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
									
									
									
									
									
								
							
							
						
						
									
										376
									
								
								gencpp.vcxproj
									
									
									
									
									
								
							| @@ -1,376 +0,0 @@ | ||||
| <?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> | ||||
| @@ -1,320 +0,0 @@ | ||||
| <?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> | ||||
| @@ -1,31 +0,0 @@ | ||||
| <?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> | ||||
		Reference in New Issue
	
	Block a user