diff --git a/dist/index.js b/dist/index.js index 65199f1d..ab6b544e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -58209,13 +58209,13 @@ function transformer(args, body, isAsync, isGenerator, filename) { __proto__: null, pos: node.start, order: TO_RIGHT, - code: `catch($tmpname){try{throw ${INTERNAL_STATE_NAME}.handleException($tmpname);}` + coder: () => `catch(${tmpname}){try{throw(${tmpname}=${INTERNAL_STATE_NAME}.handleException(${tmpname}));}` }); insertions.push({ __proto__: null, pos: node.body.end, order: TO_LEFT, - code: `}` + coder: () => `}` }); } else { const name = assertType(param, 'Identifier').name; @@ -58225,7 +58225,7 @@ function transformer(args, body, isAsync, isGenerator, filename) { __proto__: null, pos: cBody.body[0].start, order: TO_LEFT, - code: `${name}=${INTERNAL_STATE_NAME}.handleException(${name});` + coder: () => `${name}=${INTERNAL_STATE_NAME}.handleException(${name});` }); } } @@ -58235,13 +58235,13 @@ function transformer(args, body, isAsync, isGenerator, filename) { __proto__: null, pos: node.object.start, order: TO_LEFT, - code: INTERNAL_STATE_NAME + '.wrapWith(' + coder: () => INTERNAL_STATE_NAME + '.wrapWith(' }); insertions.push({ __proto__: null, pos: node.object.end, order: TO_RIGHT, - code: ')' + coder: () => ')' }); } else if (nodeType === 'Identifier') { if (node.name === INTERNAL_STATE_NAME) { @@ -58256,7 +58256,7 @@ function transformer(args, body, isAsync, isGenerator, filename) { __proto__: null, pos: node.start, order: TO_RIGHT, - code: INTERNAL_STATE_NAME + '.' + coder: () => INTERNAL_STATE_NAME + '.' }); } }); @@ -58277,7 +58277,7 @@ function transformer(args, body, isAsync, isGenerator, filename) { let curr = 0; for (let i = 0; i < insertions.length; i++) { const change = insertions[i]; - ncode += code.substring(curr, change.pos) + change.code.replace(/\$tmpname/g, tmpname); + ncode += code.substring(curr, change.pos) + change.coder(); curr = change.pos; } ncode += code.substring(curr);