Implemented a nop (no operation) function and used it on few places.

redux
David Majda 14 years ago
parent 6a194e8f68
commit 1aa3d8e07e

@ -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) {

Loading…
Cancel
Save