pegjs-util
Advanced tools
Comparing version 0.9.1 to 0.9.2
{ | ||
"name": "pegjs-util", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Utility Class for PEG.js", | ||
@@ -5,0 +5,0 @@ "main": "PEGUtil.js", |
@@ -36,4 +36,4 @@ /* | ||
}, | ||
"gruntfile": [ "Gruntfile.js" ], | ||
"prince": [ "PEGUtil.js" ] | ||
"gruntfile": [ "Gruntfile.js" ], | ||
"pegjs-util": [ "PEGUtil.js" ] | ||
}, | ||
@@ -40,0 +40,0 @@ eslint: { |
{ | ||
"name": "pegjs-util", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Utility Class for PEG.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ "pegjs", "parser", "AST", "unroll" ], |
@@ -180,6 +180,6 @@ /* | ||
var _walk = function (node, depth) { | ||
if (when === "before" || when == "both") | ||
if (when === "before" || when === "both") | ||
cb.call(null, node, depth, "before"); | ||
node.C.forEach(function (child) { _walk(child, depth + 1); }); | ||
if (when === "after" || when == "both") | ||
if (when === "after" || when === "both") | ||
cb.call(null, node, depth, "after"); | ||
@@ -186,0 +186,0 @@ }; |
@@ -76,3 +76,3 @@ | ||
var PEG = require("pegjs") | ||
var PEGUtil = require("./PEGUtil") | ||
var PEGUtil = require("pegjs-util") | ||
@@ -79,0 +79,0 @@ var parser = PEG.buildParser(fs.readFileSync("sample.pegjs", "utf8")) |
32761