"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.moduleRules = void 0;
const good_enough_parser_1 = require("good-enough-parser");
const regex_1 = require("../../../../util/regex");
const common_1 = require("./common");
const supportedRules = [
    'archive_override',
    'bazel_dep',
    'git_override',
    'local_path_override',
    'single_version_override',
];
const supportedRulesRegex = (0, regex_1.regEx)(`^${supportedRules.join('|')}$`);
exports.moduleRules = good_enough_parser_1.query
    .sym(supportedRulesRegex, (ctx, token) => ctx.startRule(token.value))
    .join(good_enough_parser_1.query.tree({
    type: 'wrapped-tree',
    maxDepth: 1,
    search: common_1.kvParams,
    postHandler: (ctx) => ctx.endRule(),
}));
//# sourceMappingURL=module.js.map