Merge branch 'master' into code-generator

Conflicts:
	lib/6to5/transformers/rest-parameters.js
This commit is contained in:
Sebastian McKenzie
2014-10-31 11:44:48 +11:00
5 changed files with 18 additions and 3 deletions

View File

@@ -35,6 +35,8 @@ var go = function (getBody, node, file) {
}
}
if (node._ignoreAliasFunctions) return;
var getId;
if (node.type === "Identifier" && node.name === "arguments") {

View File

@@ -12,9 +12,14 @@ exports.Function = function (node, parent, file) {
if (node.params.length) templateName += "-arg";
t.ensureBlock(node);
node.body.body.unshift(util.template(templateName, {
var template = util.template(templateName, {
SLICE_KEY: file.addDeclaration("slice"),
VARIABLE_NAME: rest,
SLICE_ARG: b.literal(node.params.length)
}));
});
template.declarations[0].init.arguments[0]._ignoreAliasFunctions = true;
node.body.body.unshift(template);
};

View File

@@ -1,7 +1,7 @@
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.10.7",
"version": "1.10.8",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://github.com/sebmck/6to5",
"repository": {

View File

@@ -0,0 +1,3 @@
var concat = (...arrs) => {
};

View File

@@ -0,0 +1,5 @@
"use strict";
var _slice = Array.prototype.slice;
var concat = function () {
var arrs = _slice.call(arguments);
};