From f2338016df8a1b49cca392c51519771b2a33f2b2 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 13 Jan 2015 14:37:55 -0800 Subject: [PATCH] save token when scanning binary\octal literals --- src/compiler/scanner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 427bc0012d6..2a0363f7f78 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -1039,7 +1039,7 @@ module ts { value = 0; } tokenValue = "" + value; - return SyntaxKind.NumericLiteral; + return token = SyntaxKind.NumericLiteral; } else if (pos + 2 < len && (text.charCodeAt(pos + 1) === CharacterCodes.O || text.charCodeAt(pos + 1) === CharacterCodes.o)) { pos += 2; @@ -1049,7 +1049,7 @@ 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))) {