From 3f4964cc494a4d62c3d1fa781f72faf1cf2dcce9 Mon Sep 17 00:00:00 2001 From: Mikkel RINGAUD Date: Mon, 11 Dec 2023 19:11:51 +0100 Subject: [PATCH] fix: don't skip first character on peek --- src/lexer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexer/index.ts b/src/lexer/index.ts index 227df9b..5a7df70 100644 --- a/src/lexer/index.ts +++ b/src/lexer/index.ts @@ -189,7 +189,7 @@ export class Lexer { } public peekAfterWhiteSpaces(): string | null { - let peek_pos = this.pos + 1; + let peek_pos = this.pos; while (is_space(this.text[peek_pos])) { if (peek_pos > this.text.length - 1) {