Reimplement 'babel-template' with better caching and tagged literal utilities.

This commit is contained in:
Logan Smyth
2017-10-15 15:50:14 -04:00
parent 191624d800
commit cc802c1e00
15 changed files with 1050 additions and 422 deletions

View File

@@ -111,7 +111,7 @@ export default function convertFunctionParams(path, loose) {
});
body.push(defNode);
} else if (firstOptionalIndex !== null) {
const defNode = buildArgumentsAccess(param.node, t.numericLiteral(i));
const defNode = buildArgumentsAccess([param.node, t.numericLiteral(i)]);
body.push(defNode);
} else if (param.isObjectPattern() || param.isArrayPattern()) {
const uid = path.scope.generateUidIdentifier("ref");