Browse Source

Change main flow to tolerate mixup of verbose stream and emission stream. It was originally assumed to be too messy and useless, but this jugement is best left to the user.

Signed-off-by: Vivien Oddou <[email protected]>
Vivien Oddou 2 years ago
parent
commit
189bc37cf4
1 changed files with 2 additions and 11 deletions
  1. 2 11
      src/AzslcMain.cpp

+ 2 - 11
src/AzslcMain.cpp

@@ -650,8 +650,6 @@ int main(int argc, const char* argv[])
             // intermediate state validation
             ir.Validate();
 
-            bool doEmission = true;
-
             if (stripUnusedSrgs)
             {
                 ir.RemoveUnusedSrgs();
@@ -660,7 +658,6 @@ int main(int argc, const char* argv[])
             if (dumpsym)
             {
                 DumpSymbols(ir);
-                doEmission = false;
             }
             else if (!visitName.empty())
             {
@@ -675,16 +672,10 @@ int main(int argc, const char* argv[])
                     visitOptions |= possibleOption.first ? possibleOption.second : RE::EnumType(0);
                 }
                 PrintVisitSymbol(ir, visitName, visitOptions);
-                doEmission = false;
             }
-            else
-            {
-                bool checkerFlagsPresent = semantic || verbose; // or --syntax but we already exited by now.
-                doEmission = !checkerFlagsPresent;
-            }
-
-            if (doEmission)
+            else if (!semantic)  // do emission
             {
+                verboseCout << "--Emission/Reflection--\n";
                 std::ofstream mainOutFile;
 
                 if (useOutputFile)