diff options
author | rtk0c <[email protected]> | 2022-07-30 22:09:22 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-07-30 22:09:22 -0700 |
commit | fbb26deb27909f5603746739822c0d9c338955b9 (patch) | |
tree | 848da0f150f923e6650df5d8403870c65e645333 /source/20-codegen-compiler/main.cpp | |
parent | 4067db383fb17d0580ebdc41e6354a84898e8343 (diff) |
Changeset: 88 (untested) replace manual sqlite3_step() calls with SQLiteRunningStatement wrapper
Diffstat (limited to 'source/20-codegen-compiler/main.cpp')
-rw-r--r-- | source/20-codegen-compiler/main.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/source/20-codegen-compiler/main.cpp b/source/20-codegen-compiler/main.cpp index 5b82d02..845f2f2 100644 --- a/source/20-codegen-compiler/main.cpp +++ b/source/20-codegen-compiler/main.cpp @@ -229,17 +229,6 @@ TryConsumeDirectiveArgumentList(CodegenLexer& lexer) { return result; } -std::vector<const StbLexerToken*>* -GetDirectiveArgument(std::vector<std::vector<const StbLexerToken*>>& list, size_t idx, const char* errMsg = nullptr) { - if (idx < list.size()) { - if (errMsg) { - printf("%s", errMsg); - } - return &list[idx]; - } - return nullptr; -} - bool TryConsumeKeyword(CodegenLexer& lexer, CppKeyword keyword) { auto& token = lexer.Current(); if (token.type == CLEX_id) { @@ -1360,11 +1349,19 @@ where --output-dir=<path>: the *directory* to write generated contents to. Thi } for (auto decl : as.enumsToRevisit) { + if (!decl->generating) { + continue; + } + auto& headerOutput = decl->sourceFile->postHeaderOutput; auto& sourceOutput = decl->sourceFile->postSourceOutput; GenerateForEnum(headerOutput, sourceOutput, *decl); } for (auto decl : as.structsToRevisit) { + if (!decl->generating) { + continue; + } + auto& headerOutput = decl->sourceFile->postHeaderOutput; auto& sourceOutput = decl->sourceFile->postSourceOutput; |