Skip to content

Commit 92d4ed0

Browse files
authored
polish: fix lexer state comment (#4294)
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 closes #2764
1 parent 831c121 commit 92d4ed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/language/lexer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class Lexer {
6262

6363
/**
6464
* Looks ahead and returns the next non-ignored token, but does not change
65-
* the state of Lexer.
65+
* the current Lexer token.
6666
*/
6767
lookahead(): Token {
6868
let token = this.token;

0 commit comments

Comments
 (0)