From 32e55aa0357aa8e6f77921e6f761547b55ce90c4 Mon Sep 17 00:00:00 2001 From: git Date: Fri, 12 Feb 2021 22:33:43 +0100 Subject: [PATCH] Move "[WIP]" out of the main part of the outputted string. --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bb68a71..0795d18 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,11 +19,11 @@ int main(int argc, char* argv[]) { { currentArg = ((string) argv[i]); if (currentArg == "-printresult") printResult = true; - if (currentArg.starts_with("--target=")) target = '.' + currentArg.erase(0, 9); + else if (currentArg.starts_with("--target=")) target = '.' + currentArg.erase(0, 9); } const string parsedString = parseString(make_unique(getFileContent(fileName))); const string transpiledString = transpile(parsedString, target); - if (printResult) cout << "~~~~[Yerbacon compilation result]~~~~\n\n[WIP]\n" << transpiledString << "\n\n"; + if (printResult) cout << "~~~~[Yerbacon compilation result]~~~~\n\n" << "[WIP]\n" << transpiledString << "\n\n"; setOutputFileContent(target, fileName.erase(fileName.find(".ybcon")) + target, transpiledString); } else cout << "No valid file provided.\n";