From caa36da95ca11f9c5640cf44220c85dfa81529c3 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Mon, 11 Nov 2024 13:18:26 +0200 Subject: [PATCH] fix lookahead comment we must update the lexer line number and the line start position, because lookahead saves the token within the linked list, and so will never be called again on this token we do not change the current token, however, until the lexer is advanced --- src/language/lexer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/language/lexer.ts b/src/language/lexer.ts index 300aeebbdf..841f25e786 100644 --- a/src/language/lexer.ts +++ b/src/language/lexer.ts @@ -62,7 +62,7 @@ export class Lexer { /** * Looks ahead and returns the next non-ignored token, but does not change - * the state of Lexer. + * the current Lexer token. */ lookahead(): Token { let token = this.token;