save token in scanner after scaning hex literal

This commit is contained in:
Vladimir Matveev 2014-11-20 13:44:51 -08:00
parent 8b35beaa1c
commit 60417ff379
2 changed files with 7 additions and 2 deletions

View File

@ -931,12 +931,12 @@ module ts {
value = 0;
}
tokenValue = "" + value;
return SyntaxKind.NumericLiteral;
return token = SyntaxKind.NumericLiteral;
}
// Try to parse as an octal
if (pos + 1 < len && isOctalDigit(text.charCodeAt(pos + 1))) {
tokenValue = "" + scanOctalDigits();
return SyntaxKind.NumericLiteral;
return token = SyntaxKind.NumericLiteral;
}
// This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero
// can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being

View File

@ -0,0 +1,5 @@
/// <reference path='fourslash.ts' />
////var x = 0x1,y;
format.document(); // should not crash