Transform can be simplified when clone is not done. (#2621)
This commit is contained in:
committed by
Alex Lam S.L
parent
032f096b7f
commit
01057cf76d
@@ -60,12 +60,9 @@ TreeTransformer.prototype = new TreeWalker;
|
|||||||
tw.push(this);
|
tw.push(this);
|
||||||
if (tw.before) x = tw.before(this, descend, in_list);
|
if (tw.before) x = tw.before(this, descend, in_list);
|
||||||
if (x === undefined) {
|
if (x === undefined) {
|
||||||
if (!tw.after) {
|
|
||||||
x = this;
|
x = this;
|
||||||
descend(x, tw);
|
descend(x, tw);
|
||||||
} else {
|
if (tw.after) {
|
||||||
tw.stack[tw.stack.length - 1] = x = this;
|
|
||||||
descend(x, tw);
|
|
||||||
y = tw.after(x, in_list);
|
y = tw.after(x, in_list);
|
||||||
if (y !== undefined) x = y;
|
if (y !== undefined) x = y;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user