diff options
Diffstat (limited to 'lib/node.js')
-rwxr-xr-x | lib/node.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/node.js b/lib/node.js index 9089a5fe..571cdd80 100755 --- a/lib/node.js +++ b/lib/node.js @@ -24,12 +24,10 @@ console.timeEnd("parse"); console.time("walk"); - ast.walk({ - _visit: function(node, descend) { - //console.log(node); - if (descend) descend.call(node); - } + var w = new TreeWalker(function(node){ + console.log(node.TYPE + " [ start: " + node.start.line + ":" + node.start.col + ", end: " + node.end.line + ":" + node.end.col + "]"); }); + ast.walk(w); console.timeEnd("walk"); })(); |