diff --git a/src/checks.js b/src/checks.js index 832bd25..863473f 100644 --- a/src/checks.js +++ b/src/checks.js @@ -66,7 +66,7 @@ PEG.compiler.checks = [ grammar: function(node, appliedRules) { for (var name in node.rules) { - check(ast.rules[name], appliedRules); + check(node.rules[name], appliedRules); } }, diff --git a/src/passes.js b/src/passes.js index c496ff4..b7ba038 100644 --- a/src/passes.js +++ b/src/passes.js @@ -32,7 +32,7 @@ PEG.compiler.passes = [ grammar: function(node, from, to) { for (var name in node.rules) { - replace(ast.rules[name], from, to); + replace(node.rules[name], from, to); } },