This commit is contained in:
Mihai Bazon
2012-08-15 13:32:37 +03:00
parent 861e26a666
commit c0ba9e2986
5 changed files with 112 additions and 419 deletions

View File

@@ -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");
})();