This package has been deprecated

Author message:

Use `peg.compiler.visitor` added in PEG.js 0.10.0 instead.

pegjs-each-node

0.2.1 • Public • Published

DEPRECATED. Use peg.compiler.visitor added in PEG.js 0.10.0 instead.

pegjs-each-node Build Status

npm install pegjs-each-node

var eachNode = require('pegjs-each-node')
 
eachNode(startNode, function(node, parent) {
  // This function will be run once with `startNode` itself, and then once for
  // each of its subnodes.
  console.log(node.type)
 
  // During the first run (when `node` is `startNode`), `parent` is null. (Or
  // you may pass `parent` as the third argument to `eachNode`). Then `parent`
  // is the node that contains `node`.
})

js-standard-style

License

The X11 (“MIT”) License.

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i pegjs-each-node

    Weekly Downloads

    6

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • lydell