Skip to content

Commit

Permalink
Update transform_files.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Oct 31, 2022
1 parent c3bf999 commit 6587d19
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/transform_files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ function transformClass(type, raw, options = {}) {
methods.forEach(({ node, comment }) => {
const key = node.key.name;
const value = printNode(node.value.body.body);
console.log('fff', value);
const methodAST = acorn.parse(value, {
ecmaVersion: 2022,
allowReturnOutsideFunction: true,
Expand All @@ -328,7 +327,7 @@ function transformClass(type, raw, options = {}) {
methodNameArg.value === 'initialize'
? 'super'
: `super.${methodNameArg.value}`
}(${printASTNode(value, args)})`;
}(${args.map((arg) => printASTNode(value, arg)).join(', ')})`;
superTransforms.push({
node,
methodName: methodNameArg.value,
Expand All @@ -347,7 +346,6 @@ function transformClass(type, raw, options = {}) {
`(${printNode(node.value.params).slice(0, -1)}) {\n` +
superTransforms.reduceRight((value, { node, value: out }) => {
return value.replace(printASTNode(value, node), out);
// return value.slice(0, node.start) + out + value.slice(node.end + 1);
}, value) +
'\n}'
);
Expand Down

0 comments on commit 6587d19

Please sign in to comment.