8000 save token in scanner after scaning hex literal · siddharthverma/TypeScript@60417ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 60417ff

Browse files
committed
save token in scanner after scaning hex literal
1 parent 8b35bea commit 60417ff

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/compiler/scanner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,12 +931,12 @@ module ts {
931931
value = 0;
932932
}
933933
tokenValue = "" + value;
934-
return SyntaxKind.NumericLiteral;
934+
return token = SyntaxKind.NumericLiteral;
935935
}
936936
// Try to parse as an octal
937937
if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) {
938938
tokenValue = "" + scanOctalDigits();
939-
return SyntaxKind.NumericLiteral;
939+
return token = SyntaxKind.NumericLiteral;
940940
}
941941
// This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero
942942
// can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////var x = 0x1,y;
4+
5+
format.document(); // should not crash

0 commit comments

Comments
 (0)
0