Skip to content

Commit 87bcdff

Browse files
committed
Merge pull request microsoft#1660 from Microsoft/saveNumericTokensInScanner
save token when scanning binary\octal literals
2 parents a9a994c + f233801 commit 87bcdff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/compiler/scanner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ module ts {
10391039
value = 0;
10401040
}
10411041
tokenValue = "" + value;
1042-
return SyntaxKind.NumericLiteral;
1042+
return token = SyntaxKind.NumericLiteral;
10431043
}
10441044
else if (pos + 2 < len && (text.charCodeAt(pos + 1) === CharacterCodes.O || text.charCodeAt(pos + 1) === CharacterCodes.o)) {
10451045
pos += 2;
@@ -1049,7 +1049,7 @@ module ts {
10491049
value = 0;
10501050
}
10511051
tokenValue = "" + value;
1052-
return SyntaxKind.NumericLiteral;
1052+
return token = SyntaxKind.NumericLiteral;
10531053
}
10541054
// Try to parse as an octal
10551055
if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) {

0 commit comments

Comments
 (0)