From 2e54a114dda69165232023fde9177dec0b97b8dd Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sat, 1 Oct 2022 16:04:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20make=20types=20in=20stderr=20be?= =?UTF-8?q?=20uppercase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parser.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/parser.js b/src/parser.js index 851ea38..821a2eb 100644 --- a/src/parser.js +++ b/src/parser.js @@ -109,7 +109,7 @@ class Juicescript_parser { } else { // ignore with error - this.error_token("expected identifier, but got"); + this.error_token("expected IDENTIFIER, but got"); } @@ -270,7 +270,7 @@ class Juicescript_parser { // make sure next has valid type for an argument (also allow operators) if(!this.is_argument(this.token, {operator: true, identifier: true})){ // ignore with error - this.error_token("expected argument, but got"); + this.error_token("expected ARGUMENT, but got"); continue; } @@ -366,7 +366,7 @@ class Juicescript_parser { // MAKE SURE TOKEN HAS VALID TYPE FOR A PARAMETER // if(!this.is_variable(this.token)){ // ignore with error - this.error_token("expected parameter, but got"); + this.error_token("expected PARAMETER, but got"); continue; } @@ -408,7 +408,7 @@ class Juicescript_parser { // MAKE SURE VARIABLE HAS A DIRECT NAME // if(this.token.value.length <= 0){ // ignore with error - this.error_token("expected parameter name, but got", this.peek()); + this.error_token("expected PARAMETER NAME, but got", this.peek()); return null; } @@ -449,7 +449,7 @@ class Juicescript_parser { } else { // ignore with error - this.error_token("expected variable name, but got"); + this.error_token("expected VARIABLE NAME, but got"); } // consume curly closing bracket @@ -479,7 +479,7 @@ class Juicescript_parser { } else { // ignore with error - this.error_token("expected list index, but got"); + this.error_token("expected LIST INDEX, but got"); } // consume square closing bracket @@ -705,7 +705,7 @@ class Juicescript_parser { // HANDLE TOKEN // // get token type name - let type_name = Juicescript.token_type.name(token.type).toLowerCase(); + let type_name = Juicescript.token_type.name(token.type); // try to get lexeme let lexeme = null;