Don't use "arrays" in lib/compiler/passes/remove-proxy-rules.js

The "arrays" module will be removed.

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

@ -1,7 +1,6 @@
"use strict";
let arrays = require("../../utils/arrays"),
visitor = require("../visitor");
let visitor = require("../visitor");
/*
* Removes proxy rules -- that is, rules that only delegate to other rule.
@ -28,7 +27,7 @@ function removeProxyRules(ast, options) {
ast.rules.forEach((rule, i) => {
if (isProxyRule(rule)) {
replaceRuleRefs(ast, rule.name, rule.expression.name);
if (!arrays.contains(options.allowedStartRules, rule.name)) {
if (options.allowedStartRules.indexOf(rule.name) === -1) {
indices.push(i);
}
}

Loading…
Cancel
Save