Skip to content

Commit caa36da

Browse files
committed
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
1 parent 1d98a6a commit caa36da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/language/lexer.ts

Lines changed: 1 addition & 1 deletion
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)