Skip to content

Commit e59d8d3

Browse files
committed
polish: fix lexer state comment (graphql#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 graphql#2764
1 parent c6ab746 commit e59d8d3

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
@@ -78,7 +78,7 @@ export class Lexer implements LexerInterface {
7878

7979
/**
8080
* Looks ahead and returns the next non-ignored token, but does not change
81-
* the state of Lexer.
81+
* the current Lexer token.
8282
*/
8383
lookahead(): Token {
8484
let token = this.token;

0 commit comments

Comments
 (0)