diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-08-15 13:32:37 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-08-15 14:50:27 +0300 |
commit | c0ba9e29861ab08ad8a5131705f421e96d634f4b (patch) | |
tree | 9e81de966f75e5f8205c23b220f950589688c037 /lib/node.js | |
parent | 861e26a66639ca61eab2af53de45760370c4d534 (diff) | |
download | tracifyjs-c0ba9e29861ab08ad8a5131705f421e96d634f4b.tar.gz tracifyjs-c0ba9e29861ab08ad8a5131705f421e96d634f4b.zip |
WIP
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"); })(); |