diff --git a/lib/6to5/transformation/modules/amd.js b/lib/6to5/transformation/modules/amd.js index de0c6c67f2..fba879054a 100644 --- a/lib/6to5/transformation/modules/amd.js +++ b/lib/6to5/transformation/modules/amd.js @@ -78,7 +78,7 @@ AMDFormatter.prototype._push = function (node) { if (ids[id]) { return ids[id]; } else { - return this.ids[id] = t.identifier(this.file.generateUid(id)); + return this.ids[id] = this.file.generateUidIdentifier(id); } }; diff --git a/lib/6to5/transformation/transformers/array-comprehension.js b/lib/6to5/transformation/transformers/array-comprehension.js index 5e874e07df..3d89ce86cb 100644 --- a/lib/6to5/transformation/transformers/array-comprehension.js +++ b/lib/6to5/transformation/transformers/array-comprehension.js @@ -25,7 +25,7 @@ var singleArrayExpression = function (node) { }; var multiple = function (node, file) { - var uid = file.generateUid("arr"); + var uid = file.generateUidIdentifier("arr"); var container = util.template("array-comprehension-container", { KEY: uid diff --git a/lib/6to5/transformation/transformers/for-of.js b/lib/6to5/transformation/transformers/for-of.js index 3355d9407a..35dadbd458 100644 --- a/lib/6to5/transformation/transformers/for-of.js +++ b/lib/6to5/transformation/transformers/for-of.js @@ -19,7 +19,7 @@ exports.ForOfStatement = function (node, parent, file, scope) { } var node2 = util.template("for-of", { - ITERATOR_KEY: file.generateUid("iterator", scope), + ITERATOR_KEY: file.generateUidIdentifier("iterator", scope), STEP_KEY: stepKey, OBJECT: node.right }); diff --git a/lib/6to5/transformation/transformers/let-scoping.js b/lib/6to5/transformation/transformers/let-scoping.js index a56d6af6b7..f6d9010154 100644 --- a/lib/6to5/transformation/transformers/let-scoping.js +++ b/lib/6to5/transformation/transformers/let-scoping.js @@ -129,7 +129,7 @@ LetScoping.prototype.run = function () { // build a call and a unique id that we can assign the return value to var call = t.callExpression(fn, params); - var ret = t.identifier(this.file.generateUid("ret", this.scope)); + var ret = this.file.generateUidIdentifier("ret", this.scope); var hasYield = traverse.hasType(fn.body, "YieldExpression", t.FUNCTION_TYPES); if (hasYield) { @@ -445,7 +445,7 @@ LetScoping.prototype.buildHas = function (ret, call) { if (has.hasBreak || has.hasContinue) { // ensure that the parent has a label as we're building a switch and we // need to be able to access it - var label = forParent.label = forParent.label || t.identifier(this.file.generateUid("loop", this.scope)); + var label = forParent.label = forParent.label || this.file.generateUidIdentifier("loop", this.scope); if (has.hasBreak) { cases.push(t.switchCase(t.literal("break"), [t.breakStatement(label)]));