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.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/20-codegen-compiler/main.cpp b/source/20-codegen-compiler/main.cpp
index af51900..782996b 100644
--- a/source/20-codegen-compiler/main.cpp
+++ b/source/20-codegen-compiler/main.cpp
@@ -938,13 +938,6 @@ void ParseInputFileAndGenerate(AppState& as, CodegenLexer& /*lexingState*/ ls, s
++idx;
}
- // if (po.currentEnum->generating) {
- // GenerateForEnum(po.headerOutput, po.sourceOutput, *po.currentEnum);
- // }
- if (po.currentEnum->generating) {
- as.enumsToRevisit.push_back(po.currentEnum);
- }
-
{
auto decl = as.runtimeModel->AddEnum(std::move(fullname), std::move(enumDecl));
// Fix pointers
@@ -952,6 +945,10 @@ void ParseInputFileAndGenerate(AppState& as, CodegenLexer& /*lexingState*/ ls, s
po.currentEnumBraceDepth = po.currentBraceDepth;
}
+ if (po.currentEnum->generating) {
+ as.enumsToRevisit.push_back(po.currentEnum);
+ }
+
// NOTE: we parse the whole enum at once (above code), the enum ends right here after the closing brace '}'
po.currentEnum = nullptr;
po.currentEnumBraceDepth = -1;