diff --git a/version1.0/choose.txt b/version1.0/choose.txt index f439d4e..bb819dc 100644 --- a/version1.0/choose.txt +++ b/version1.0/choose.txt @@ -8,6 +8,10 @@ elsif(this_token.type==__elsif) parse.push(this_token); return; } +else if(this_token.type!=__else) +{ + exit(0); +} elsif(this_token.type==__elsif) { parse.push(this_token); diff --git a/version1.0/func.txt b/version1.0/func.txt index 9334f92..d00a425 100644 --- a/version1.0/func.txt +++ b/version1.0/func.txt @@ -6,4 +6,5 @@ var f=func(n,m,dynamic...) n+=m; return dynamic; }; -print(f(1,1,0,0,0,0,0)[3]); \ No newline at end of file +print(f(1,1,0,0,0,0,0)[3]); +function([0,1,2,3],{str:"str"}); \ No newline at end of file diff --git a/version1.0/main.cpp b/version1.0/main.cpp index 00f000a..0f4f49d 100644 --- a/version1.0/main.cpp +++ b/version1.0/main.cpp @@ -18,7 +18,7 @@ int main() std::cout<<">> 2. [cls ] |clear the screen."<> 3. [exit ] |shut down the interpreter."<> 4. [lexer ] |run and show the lexer. (-lexer)"<> 5. [parser] |run parser. (-parser)"<> 5. [parser] |run parser and see parse stack & parse result(s). (-parser)"<> 6. [ast ] |print the abstract syntax tree."<> 7. [del ] |delete program in memory."<> 8. [run ] |run the programme in stack. (-lexer -parser)"<>[Parse] "<>[Parse] "<