"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = parse;
const good_enough_parser_1 = require("good-enough-parser");
const context_1 = require("../context");
const maven_1 = require("./maven");
const module_1 = require("./module");
const rule = good_enough_parser_1.query.alt(module_1.moduleRules, maven_1.mavenRules);
const query = good_enough_parser_1.query.tree({
    type: 'root-tree',
    maxDepth: 16,
    search: rule,
});
const starlarkLang = good_enough_parser_1.lang.createLang('starlark');
function parse(input) {
    const parsedResult = starlarkLang.query(input, query, new context_1.Ctx());
    return parsedResult?.results ?? [];
}
//# sourceMappingURL=index.js.map