From cae42e4fbde711aea4010bda48833a0926ab2e8a Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Wed, 28 Sep 2022 16:44:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20only=20use=20`end`=20to=20end=20?= =?UTF-8?q?command=20definition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/concept.sh | 2 +- src/parser.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/concept.sh b/doc/concept.sh index f39a1c8..a191368 100644 --- a/doc/concept.sh +++ b/doc/concept.sh @@ -185,7 +185,7 @@ halt # return from command to parent scope # halt program in root scope -exit|return|end +exit|return diff --git a/src/parser.js b/src/parser.js index 358dc4e..851ea38 100644 --- a/src/parser.js +++ b/src/parser.js @@ -160,8 +160,8 @@ class Juicescript_parser { parse_end(){ // ARE WE IN ROOT SCOPE? // if(this.scope === null){ - // add as command - this.command_add({name: "end"}); + // unexpected (ignore with error) + this.error_token("unexpected token"); return; }