0
0

🚸 only use end to end command definition

This commit is contained in:
DrMaxNix 2022-09-28 16:44:06 +02:00
parent 4a6a97aec5
commit cae42e4fbd
2 changed files with 3 additions and 3 deletions

View File

@ -185,7 +185,7 @@ halt
# return from command to parent scope # return from command to parent scope
# halt program in root scope # halt program in root scope
exit|return|end exit|return

View File

@ -160,8 +160,8 @@ class Juicescript_parser {
parse_end(){ parse_end(){
// ARE WE IN ROOT SCOPE? // // ARE WE IN ROOT SCOPE? //
if(this.scope === null){ if(this.scope === null){
// add as command // unexpected (ignore with error)
this.command_add({name: "end"}); this.error_token("unexpected token");
return; return;
} }