add back non-es5 number guard in literal code gen

This commit is contained in:
Sebastian McKenzie 2015-06-17 22:56:08 +01:00
parent 238c68f829
commit 2c8e374eaf

View File

@ -103,7 +103,7 @@ export function Literal(node, print, parent) {
// check to see if this is the same number as the raw one in the original source as asm.js uses
// numbers in the form 5.0 for type hinting
var raw = node.raw;
if (val === +raw && raw[raw.length - 1] !== ".") {
if (val === +raw && raw[raw.length - 1] !== "." && !/^0[bo]/i.test(raw)) {
val = raw;
}