From 02bb1a43e9971c1ebb4da70ccb13c752956d4029 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sat, 1 Oct 2022 17:55:47 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20add=20missing=20value=20to=20TRU?= =?UTF-8?q?E=20and=20FALSE=20tokens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lexer.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lexer.js b/src/lexer.js index 8396f44..c99e9a7 100644 --- a/src/lexer.js +++ b/src/lexer.js @@ -642,6 +642,17 @@ class Juicescript_lexer { token.value = options.value ?? null; + // TRY TO GUESS VALUE // + if(token.value === null){ + if(token.type === Juicescript.token_type.TRUE){ + token.value = true; + + } else if(token.type === Juicescript.token_type.FALSE){ + token.value = false; + } + } + + // ADD TO LIST // this.token_list.push(token); }