No builds. Sourcegraph hasn't successfully analyzed this repository yet. Click the indicator next to any commit to see the build status and logs for that commit. Report any issues you see by using the form in the bottom right of your screen.

provides a walker for the acorn JavaScript parser that traverses all AST nodes

README.md

acorn-walkall

xrefs Most used function Number of funcs Status

acorn-walkall provides a custom walker for Marijn Haverbeke’s acorn JavaScript parser that traverses all AST nodes.

Documentation: acorn-walkall on Sourcegraph

Usage

var acorn = require('acorn'),
    walk = require('acorn/util/walk'),
    walkall = require('./walkall');
var ast = acorn.parse('var x = 7;');
walk.simple(ast, walkall.makeVisitors(function(node) {
  console.log('Found node type', node.type);
}), walkall.traversers);

The included bin/walkall script emits the AST node type and source location for each AST node in the specified JavaScript file.

Running tests

Run npm test.

Author