fix up raw number literal
This commit is contained in:
@@ -100,7 +100,11 @@ export function Literal(node) {
|
||||
// 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;
|
||||
this.push(val === +raw ? raw : val + "");
|
||||
if (val === +raw && raw[raw.length - 1] !== ".") {
|
||||
this.push(raw);
|
||||
} else {
|
||||
this.push(val + "");
|
||||
}
|
||||
} else if (type === "boolean") {
|
||||
this.push(val ? "true" : "false");
|
||||
} else if (node.regex) {
|
||||
|
||||
Reference in New Issue
Block a user