fixed non-recursive traverse() for CodeNode

This commit is contained in:
gfxmonk
2010-03-13 23:49:51 +11:00
committed by Jeremy Ashkenas
parent 3fed9761a6
commit b269884f8d
2 changed files with 2 additions and 2 deletions

View File

@@ -953,7 +953,7 @@
_a = []; _b = this.real_children(); _a = []; _b = this.real_children();
for (_c = 0, _d = _b.length; _c < _d; _c++) { for (_c = 0, _d = _b.length; _c < _d; _c++) {
child = _b[_c]; child = _b[_c];
_a.push(block(child)); _a.push(child.traverse(block));
} }
return _a; return _a;
}; };

View File

@@ -723,7 +723,7 @@ exports.CodeNode: class CodeNode extends BaseNode
# Custom `traverse` implementation that uses the `real_children`. # Custom `traverse` implementation that uses the `real_children`.
traverse: (block) -> traverse: (block) ->
block this block this
block(child) for child in @real_children() child.traverse block for child in @real_children()
toString: (idt) -> toString: (idt) ->
idt ||= '' idt ||= ''