Show an error when an invalid argument is provided
This commit is contained in:
parent
9a27c0c9c7
commit
02e8de7243
|
@ -29,6 +29,10 @@ int main(int argc, char* argv[]) {
|
|||
else if (currentArg == Argument("parallel")) parallel = true;
|
||||
else if (currentArg == Argument("newlinesoff")) newLines = false;
|
||||
else if (currentArg.ends_with(".ybcon")) files.insert(currentArg);
|
||||
else if (i > 0) {
|
||||
cout << '"' << currentArg << "\" is not a valid argument." << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
const auto compile = [&target, &newLines](string_view name) -> string {
|
||||
string transpiledString = transpile(parseString(getFileContent(name.data())), target, newLines);
|
||||
|
|
Loading…
Reference in New Issue