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){
|
||||
var x, y;
|
||||
tw.push(this);
|
||||
this.walker = new TreeWalker;
|
||||
this.walker.stack = tw.stack.concat();
|
||||
if (tw.before) x = tw.before(this, descend, in_list);
|
||||
if (x === undefined) {
|
||||
if (!tw.after) {
|
||||
|
|
@ -75,8 +77,10 @@ TreeTransformer.prototype = new TreeWalker;
|
|||
});
|
||||
};
|
||||
|
||||
function do_list(list, tw) {
|
||||
return MAP(list, function(node){
|
||||
function do_list(list, tw)
|
||||
{
|
||||
return MAP(list, function(node , i){
|
||||
node._position = i;
|
||||
return node.transform(tw, true);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user