Skip to content

Commit 505b4f8

Browse files
CitoIvanGoncharov
andauthored
lexer: Remove superfluous statement in readDigits (#3264)
* lexer: Remove superfluous statement in `readDigits` * review changes Co-authored-by: Ivan Goncharov <[email protected]>
1 parent e6820a9 commit 505b4f8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/language/lexer.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,11 @@ function readDigits(lexer: Lexer, start: number, firstCode: number): number {
489489
}
490490

491491
const body = lexer.source.body;
492-
let position = start;
493-
let code = firstCode;
492+
let position = start + 1; // +1 to skip first firstCode
494493

495-
do {
496-
code = body.charCodeAt(++position);
497-
} while (isDigit(code));
494+
while (isDigit(body.charCodeAt(position))) {
495+
++position;
496+
}
498497

499498
return position;
500499
}

0 commit comments

Comments
 (0)