Skip to content

Commit

Permalink
lexer: Remove superfluous statement in readDigits (#3264)
Browse files Browse the repository at this point in the history
* lexer: Remove superfluous statement in `readDigits`

* review changes

Co-authored-by: Ivan Goncharov <ivan.goncharov.ua@gmail.com>
  • Loading branch information
Cito and IvanGoncharov committed Sep 20, 2021
1 parent e6820a9 commit 505b4f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/language/lexer.ts
Expand Up @@ -489,12 +489,11 @@ function readDigits(lexer: Lexer, start: number, firstCode: number): number {
}

const body = lexer.source.body;
let position = start;
let code = firstCode;
let position = start + 1; // +1 to skip first firstCode

do {
code = body.charCodeAt(++position);
} while (isDigit(code));
while (isDigit(body.charCodeAt(position))) {
++position;
}

return position;
}
Expand Down

0 comments on commit 505b4f8

Please sign in to comment.