🚀 add colorful error info print.

This commit is contained in:
ValKmjolnir
2022-08-31 00:56:19 +08:00
parent 27ceeb517d
commit b022b25cea
5 changed files with 30 additions and 15 deletions

View File

@@ -61,7 +61,7 @@ void logo()
<<" / \\/ / _` / __|/ _` | |\n"
<<" / /\\ / (_| \\__ \\ (_| | |\n"
<<" \\_\\ \\/ \\__,_|___/\\__,_|_|\n"
<<"nasal ver : "<<__nasver<<" ("<<__DATE__<<" "<<__TIME__<<")\n"
<<"version : "<<__nasver<<" ("<<__DATE__<<" "<<__TIME__<<")\n"
<<"c++ std : "<<__cplusplus<<"\n"
<<"thanks to : https://github.com/andyross/nasal\n"
<<"code repo : https://github.com/ValKmjolnir/Nasal-Interpreter\n"
@@ -135,7 +135,7 @@ i32 main(i32 argc,const char* argv[])
{
string s(argv[1]);
if(s=="-v" || s=="--version")
logo();
std::clog<<"nasal "<<__nasver<<" ("<<__DATE__<<" "<<__TIME__<<")\n";
else if(s=="-h" || s=="--help")
help();
else if(s[0]!='-')