See #441.
@ -26,7 +26,7 @@ var asts = {
named: consumesExpression,
choice: function(node) {
return arrays.every(node.alternatives, consumes);
return node.alternatives.every(consumes);
},
action: consumesExpression,
@ -28,7 +28,7 @@ function reportInfiniteRecursion(ast) {
sequence: function(node) {
arrays.every(node.elements, function(element) {
node.elements.every(function(element) {
check(element);
return !asts.alwaysConsumesOnSuccess(ast, element);
@ -60,18 +60,6 @@ var arrays = {
return array.map(function (e) { return e[key]; });
every: function(array, predicate) {
var length = array.length, i;
for (i = 0; i < length; i++) {
if (!predicate(array[i])) {
return false;
}
return true;
some: function(array, predicate) {