From f81ae1845baa83ef561e2a0e1b974eb8c91ddd3e Mon Sep 17 00:00:00 2001 From: David Majda Date: Wed, 14 Sep 2016 10:03:59 +0200 Subject: [PATCH] Don't use "arrays" in lib/compiler/passes/report-infinite-recursion.js The "arrays" module will be removed. See #442. --- lib/compiler/passes/report-infinite-recursion.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/compiler/passes/report-infinite-recursion.js b/lib/compiler/passes/report-infinite-recursion.js index 985ef51..8cb4511 100644 --- a/lib/compiler/passes/report-infinite-recursion.js +++ b/lib/compiler/passes/report-infinite-recursion.js @@ -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(