From fbb26deb27909f5603746739822c0d9c338955b9 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 30 Jul 2022 22:09:22 -0700 Subject: Changeset: 88 (untested) replace manual sqlite3_step() calls with SQLiteRunningStatement wrapper --- source/20-codegen-compiler/main.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 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 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* -GetDirectiveArgument(std::vector>& 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=: 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; -- cgit v1.2.3-70-g09d2