Merge branch 'binaryIntegerLiteral' of https://github.com/Microsoft/TypeScript into binaryIntegerLiteral

This commit is contained in:
Yui T
2014-11-24 18:36:22 -08:00
14 changed files with 370 additions and 162 deletions

View File

@@ -806,7 +806,7 @@ module ts {
if (compilerOptions.sourceMap && (node.kind === SyntaxKind.StringLiteral || isTemplateLiteralKind(node.kind))) {
writer.writeLiteral(text);
}
// For version below ES6, emit binary integer literal and octal integer literal as decimal value
// For version below ES6, emit binary integer literal and octal integer literal in canonical form
else if (compilerOptions.target < ScriptTarget.ES6 && node.kind === SyntaxKind.NumericLiteral && isBinaryOrOctalIntegerLiteral(text)) {
write(node.text);
}