Modify src/main.cpp a bit.
This commit is contained in:
parent
27ceae472b
commit
179d3813ab
|
@ -13,14 +13,14 @@ extern string parseString(unique_ptr<string> toParse);
|
|||
extern string transpile(string toTranspile, string language);
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if ((argc == 2) && (((string) argv[1]) == "--version")) { cout << YBCON_VERSION << endl; exit(0); }
|
||||
if ((argc == 2) && (((string) argv[1]) == "--version")) { cout << YBCON_VERSION << endl; exit(EXIT_SUCCESS); }
|
||||
string fileName = (argv[argc - 1] != nullptr) ? argv[argc - 1] : "none" ;
|
||||
if (fileName != "none" and fileName.ends_with(".ybcon"))
|
||||
{
|
||||
bool printResult = false;
|
||||
string target = ".lua";
|
||||
string currentArg;
|
||||
for (int i = 0; i < argc; i++)
|
||||
for (signed int i = 0; i < argc; ++i)
|
||||
{
|
||||
currentArg = ((string) argv[i]);
|
||||
if ((currentArg == "--printresult") || (currentArg == "-p")) printResult = true;
|
||||
|
|
Loading…
Reference in New Issue