From a55e98b68735f1e4152a01773f22d28c472138ab Mon Sep 17 00:00:00 2001 From: rtk0c Date: Tue, 13 Jun 2023 16:47:18 -0700 Subject: Changeset: 96 General maintainance (actually these changes are fro ma while ago, like Jan 2023 and I forgot what they do) --- source/20-codegen-compiler/main.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'source/20-codegen-compiler/main.cpp') diff --git a/source/20-codegen-compiler/main.cpp b/source/20-codegen-compiler/main.cpp index 845f2f2..6e4f9a0 100644 --- a/source/20-codegen-compiler/main.cpp +++ b/source/20-codegen-compiler/main.cpp @@ -178,6 +178,9 @@ enum CodegenDirective { CD_ClassProperty, CD_ClassMethod, CD_Enum, + CD_XGlobalVar, + CD_XGlobalVarCtor, + CD_XGlobalVarDtor, CD_COUNT, }; @@ -187,6 +190,9 @@ RSTR_LUT_DECL(CodegenDirective, 0, CD_COUNT) { RSTR_LUT_MAP(CD_ClassProperty, "BRUSSEL_PROPERTY"); RSTR_LUT_MAP(CD_ClassMethod, "BRUSSEL_METHOD"); RSTR_LUT_MAP(CD_Enum, "BRUSSEL_ENUM"); + RSTR_LUT_MAP(CD_XGlobalVar, "BRUSSEL_GLOBAL_DECL"); + RSTR_LUT_MAP(CD_XGlobalVarCtor, "BRUSSEL_GLOBAL_CTOR"); + RSTR_LUT_MAP(CD_XGlobalVarDtor, "BRUSSEL_GLOBAL_DTOR"); } std::vector> @@ -510,8 +516,8 @@ void GenerateClassFunction(CodegenOutput& headerOutput, CodegenOutput& sourceOut void GenerateForClassMetadata( CodegenOutput& headerOutput, CodegenOutput& sourceOutput, - const DeclStruct& decl) // -{ + const DeclStruct& decl // +) { auto& mangedName = decl.GetMangledName(); auto mangedNameCstr = mangedName.c_str(); @@ -1088,6 +1094,21 @@ void ParseInputFileAndGenerate(AppState& as, CodegenLexer& /*lexingState*/ ls, s goto endCaseCLEX_id; } + case CD_XGlobalVar: { + // TODO + goto endCaseCLEX_id; + } + + case CD_XGlobalVarCtor: { + // TODO + goto endCaseCLEX_id; + } + + case CD_XGlobalVarDtor: { + // TODO + goto endCaseCLEX_id; + } + // This directive always appear inside a enum{} block, which is handled above in the keywords section case CD_Enum: case CD_COUNT: break; -- cgit v1.2.3-70-g09d2