Generate original number representation when value was not changed.

This commit is contained in:
Ingvar Stepanyan
2015-06-17 18:20:35 +03:00
parent f6ff366edf
commit fd4c0dae95
3 changed files with 4 additions and 1 deletions

View File

@@ -97,7 +97,8 @@ export function Literal(node) {
if (type === "string") {
this._stringLiteral(val);
} else if (type === "number") {
this.push(val + "");
var raw = node.raw;
this.push(val === +raw ? raw : val + "");
} else if (type === "boolean") {
this.push(val ? "true" : "false");
} else if (node.regex) {