import { defaultGrammarResolverErrorProvider as e, defaultGrammarValidatorErrorProvider as t } from "../../errors_public.js";
import { resolveGrammar as n } from "../resolver.js";
import { validateGrammar as r } from "../checks.js";
//#region ../../node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js
function i(t) {
	let r = Object.assign({ errMsgProvider: e }, t), i = {};
	return t.rules.forEach((e) => {
		i[e.name] = e;
	}), n(i, r.errMsgProvider);
}
function a(e) {
	let n = e.errMsgProvider ?? t;
	return r(e.rules, e.tokenTypes, n, e.grammarName);
}
//#endregion
export { i as resolveGrammar, a as validateGrammar };
