Don't use "arrays" in lib/compiler/passes/report-infinite-recursion.js

The "arrays" module will be removed.

See #442.
redux
David Majda 8 years ago
parent 71ef4c9b91
commit f81ae1845b

@ -1,7 +1,6 @@
"use strict";
let arrays = require("../../utils/arrays"),
GrammarError = require("../../grammar-error"),
let GrammarError = require("../../grammar-error"),
asts = require("../asts"),
visitor = require("../visitor");
@ -36,7 +35,7 @@ function reportInfiniteRecursion(ast) {
},
rule_ref: function(node) {
if (arrays.contains(visitedRules, node.name)) {
if (visitedRules.indexOf(node.name) !== -1) {
visitedRules.push(node.name);
throw new GrammarError(

Loading…
Cancel
Save