diff --git a/lib/compiler.js b/lib/compiler.js index 830add9..485510b 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -6,6 +6,8 @@ (function() { +function nop() {} + /* ===== PEG ===== */ /* @@ -111,11 +113,11 @@ PEG.Grammar.Rule.prototype.checkReferencedRulesExist = function(grammar) { this._expression.checkReferencedRulesExist(grammar); }; -PEG.Grammar.Literal.prototype.checkReferencedRulesExist = function(grammar) {}; +PEG.Grammar.Literal.prototype.checkReferencedRulesExist = nop; -PEG.Grammar.Class.prototype.checkReferencedRulesExist = function(grammar) {}; +PEG.Grammar.Class.prototype.checkReferencedRulesExist = nop; -PEG.Grammar.Any.prototype.checkReferencedRulesExist = function(grammar) {}; +PEG.Grammar.Any.prototype.checkReferencedRulesExist = nop; PEG.Grammar.Sequence.prototype.checkReferencedRulesExist = function(grammar) { PEG.ArrayUtils.each(this._elements, function(element) { @@ -153,11 +155,11 @@ PEG.Grammar.Rule.prototype.checkNoLeftRecursion = function(grammar, appliedRules this._expression.checkNoLeftRecursion(grammar, appliedRules.concat(this._name)); }; -PEG.Grammar.Literal.prototype.checkNoLeftRecursion = function(grammar, appliedRules) {}; +PEG.Grammar.Literal.prototype.checkNoLeftRecursion = nop; -PEG.Grammar.Class.prototype.checkNoLeftRecursion = function(grammar, appliedRules) {}; +PEG.Grammar.Class.prototype.checkNoLeftRecursion = nop; -PEG.Grammar.Any.prototype.checkNoLeftRecursion = function(grammar, appliedRules) {}; +PEG.Grammar.Any.prototype.checkNoLeftRecursion = nop; PEG.Grammar.Sequence.prototype.checkNoLeftRecursion = function(grammar, appliedRules) { if (this._elements.length > 0) {