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"; "use strict";
let arrays = require("../../utils/arrays"), let visitor = require("../visitor");
visitor = require("../visitor");
/* /*
* Removes proxy rules -- that is, rules that only delegate to other rule. * 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) => { ast.rules.forEach((rule, i) => {
if (isProxyRule(rule)) { if (isProxyRule(rule)) {
replaceRuleRefs(ast, rule.name, rule.expression.name); replaceRuleRefs(ast, rule.name, rule.expression.name);
if (!arrays.contains(options.allowedStartRules, rule.name)) { if (options.allowedStartRules.indexOf(rule.name) === -1) {
indices.push(i); indices.push(i);
} }
} }

Loading…
Cancel
Save