aboutsummaryrefslogtreecommitdiff
path: root/source/20-codegen-compiler/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/20-codegen-compiler/main.cpp')
-rw-r--r--source/20-codegen-compiler/main.cpp25
1 files changed, 23 insertions, 2 deletions
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<std::vector<const StbLexerToken*>>
@@ -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;