update & bug fixed

This commit is contained in:
Valk Richard Li
2021-01-05 23:17:32 +08:00
parent b862aa91eb
commit 9474ac9ef0
6 changed files with 72 additions and 173 deletions
-12
View File
@@ -12,7 +12,6 @@ void help()
std::cout<<">> [\"file\"] input a file name.\n";
std::cout<<">> [help ] show help.\n";
std::cout<<">> [clear ] clear the screen.\n";
std::cout<<">> [del ] clear the input filename.\n";
std::cout<<">> [lex ] use lexer to turn code into tokens.\n";
std::cout<<">> [ast ] do parsing and check the abstract syntax tree.\n";
std::cout<<">> [code ] show byte code.\n";
@@ -32,15 +31,6 @@ void logo()
return;
}
void del_func()
{
lexer.clear();
parse.clear();
inputfile="null";
std::cout<<">> [Delete] complete.\n";
return;
}
void die(std::string stage,std::string filename)
{
std::cout<<">> ["<<stage<<"] in <\""<<filename<<"\">: error(s) occurred,stop.\n";
@@ -169,8 +159,6 @@ int main()
system("clear");
#endif
}
else if(command=="del")
del_func();
else if(command=="lex")
lex_func();
else if(command=="ast")