From 76cd97715fe18b9421d166e925a31bbd7bb4878f Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Thu, 25 Mar 2021 21:33:42 +0100 Subject: [PATCH] Add the "--target=" parameter to the shell command. --- scripts/ybcon | 2 +- src/transpiler/MainTranspile.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ybcon b/scripts/ybcon index 4b32cce..f9f938c 100755 --- a/scripts/ybcon +++ b/scripts/ybcon @@ -55,7 +55,7 @@ if [ "$#" != 0 ]; then case "$it" in -h | --help | --version ) usageExit ;; - -p | --printresult ) + -p | --printresult | --target=* ) if test "${args#*$it}" = "$args"; then newArgs "$it" else diff --git a/src/transpiler/MainTranspile.cpp b/src/transpiler/MainTranspile.cpp index 51a86a9..1e56ac7 100644 --- a/src/transpiler/MainTranspile.cpp +++ b/src/transpiler/MainTranspile.cpp @@ -35,8 +35,8 @@ string transpile(ParseTree tree, string language) } // TODO Actually transpile } else { - cout << '"' << (char) toupper(language.at(1)) << language.erase(0, 2) << "\" is not a valid target."; - exit(1); + cout << '"' << (char) toupper(language.at(1)) << language.erase(0, 2) << "\" is not a valid target." << endl; + exit(0); } return transpiled; } \ No newline at end of file