From 1e57dad38e3fda4189382b78db9ab713bc42fcbd Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Thu, 8 Sep 2022 19:02:59 +0200 Subject: [PATCH] :bug: always update `this.char` on `this.next()` --- src/lexer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lexer.js b/src/lexer.js index a7fc427..40cbd18 100644 --- a/src/lexer.js +++ b/src/lexer.js @@ -36,7 +36,7 @@ class Juicescript_lexer { this.start = this.end; // consume next character - this.char = this.next(); + this.next(); // scan next token this.scan_one(); @@ -556,7 +556,7 @@ class Juicescript_lexer { HELPER: Consume next character from source */ next(){ - return this.source.charAt(this.end++); + this.char = this.source.charAt(this.end++); } /*