i made the javascripts faster with a transformer prepass to check what transformers actually have to be ran

This commit is contained in:
Sebastian McKenzie
2015-02-04 12:56:34 +11:00
parent ffc9244f88
commit 7d950cd60a
30 changed files with 223 additions and 95 deletions

View File

@@ -94,8 +94,10 @@ exports.Literal = function (node) {
});
this.push(val);
} else if (type === "boolean" || type === "number") {
this.push(JSON.stringify(val));
} else if (type === "number") {
this.push(val + "");
} else if (type === "boolean" ) {
this.push(val ? "true" : "false");
} else if (node.regex) {
this.push("/" + node.regex.pattern + "/" + node.regex.flags);
} else if (val === null) {