Skip to content

Lexer: Fix comments to reflex current behaviour #1558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/language/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ function printCharCode(code) {
/**
* Gets the next token from the source starting at the given position.
*
* This skips over whitespace and comments until it finds the next lexable
* token, then lexes punctuators immediately or calls the appropriate helper
* function for more complicated tokens.
* This skips over whitespace until it finds the next lexable token, then lexes
* punctuators immediately or calls the appropriate helper function for more
* complicated tokens.
*/
function readToken(lexer: Lexer<*>, prev: Token): Token {
const source = lexer.source;
Expand Down Expand Up @@ -362,8 +362,7 @@ function unexpectedCharacterMessage(code) {

/**
* Reads from body starting at startPosition until it finds a non-whitespace
* or commented character, then returns the position of that character for
* lexing.
* character, then returns the position of that character for lexing.
*/
function positionAfterWhitespace(
body: string,
Expand Down