add method
This commit is contained in:
parent
5538ec7bd8
commit
c7cca91770
|
|
@ -58,6 +58,8 @@ TreeTransformer.prototype = new TreeWalker;
|
||||||
node.DEFMETHOD("transform", function(tw, in_list){
|
node.DEFMETHOD("transform", function(tw, in_list){
|
||||||
var x, y;
|
var x, y;
|
||||||
tw.push(this);
|
tw.push(this);
|
||||||
|
this.walker = new TreeWalker;
|
||||||
|
this.walker.stack = tw.stack.concat();
|
||||||
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) {
|
if (!tw.after) {
|
||||||
|
|
@ -75,8 +77,10 @@ TreeTransformer.prototype = new TreeWalker;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function do_list(list, tw) {
|
function do_list(list, tw)
|
||||||
return MAP(list, function(node){
|
{
|
||||||
|
return MAP(list, function(node , i){
|
||||||
|
node._position = i;
|
||||||
return node.transform(tw, true);
|
return node.transform(tw, true);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user