Use the assign operator for a few variables in main.cpp.

This commit is contained in:
Username404 2021-06-10 21:57:56 +02:00
parent af729c527b
commit a9d137fab6
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 3 deletions

View File

@ -17,8 +17,7 @@ int main(int argc, char* argv[]) {
if ((currentArg == "--printresult") || (currentArg == "-p")) printResult = true;
else if (currentArg.starts_with("--target=")) {
currentArg.remove_prefix(9);
target = '.';
target += currentArg;
(target = '.') += currentArg;
}
else if (currentArg.ends_with(".ybcon")) files.push_back(currentArg);
}
@ -29,7 +28,7 @@ int main(int argc, char* argv[]) {
if (printResult) cout << "~~~~[Yerbacon compilation result]~~~~\n\n" << "[WIP]\n" << transpiledString << "\n\n";
fileName.remove_suffix(6);
string outputFile;
outputFile.append(fileName); outputFile.append(target);
(outputFile = fileName).append(target);
outputFileContent(outputFile, transpiledString);
}
}