-
Notifications
You must be signed in to change notification settings - Fork 0
/
Meow.cpp
49 lines (46 loc) · 1.01 KB
/
Meow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "Meow.h"
int main(int argc, char const *argv[])
{
Meow lang;
for(int i=1;i< argc;i++){
string ag = argv[i];
if(lang.exists_(ag)){
lang.passive();
vector<string> s = lang.readfile(argv[i]);
for(int j =0;j< s.size();j++){
//lang.line = i;
//cout<<j<<endl;
lang.worker(s[j],true);
}
}
if(ag == "-e"){
lang.passive();
lang.worker(argv[i+1],false);
}else if(ag == "-h"){
lang.help(0);
}else if(ag == "-v"){
cout<<"Meow "<<lang.data["VERSION"]<<endl;
}else if((ag == "-e")&&(i+1 < argc)){
lang.decode(argv[i+1]);
}else if(ag == "-p"){
lang.passive();
cout<<"Pointer: "+lang.meow<<endl;
}else if(ag == "-his"){
lang.history("",true);
}
}
if(!argv[1]){
string test;
cout<<"Welcome to Meow v"+lang.data["VERSION"]+"\n"
"Type \"help\" for more information.\n";
lang.passive();
while(true){
cout<<lang.data["PS1"]+" ";
getline(cin,test);
lang.history(test,false);
lang.worker(test,false);
cout<<endl;
}
}
return 0;
}