1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1 1 367 7 7 7 7 7 2 7 7 | var t = require("../../types"); exports.Function = function (node, parent, file) { if (!node.rest) return; var rest = node.rest; delete node.rest; t.ensureBlock(node); var call = file.toArray(t.identifier("arguments")); if (node.params.length) { call.arguments.push(t.literal(node.params.length)); } call._ignoreAliasFunctions = true; node.body.body.unshift(t.variableDeclaration("var", [ t.variableDeclarator(rest, call) ])); }; |