import { Alternation, Alternative, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Rule, Terminal } from "./model.js";
var GAstVisitor = class {
	visit(u) {
		let d = u;
		switch (d.constructor) {
			case NonTerminal: return this.visitNonTerminal(d);
			case Alternative: return this.visitAlternative(d);
			case Option: return this.visitOption(d);
			case RepetitionMandatory: return this.visitRepetitionMandatory(d);
			case RepetitionMandatoryWithSeparator: return this.visitRepetitionMandatoryWithSeparator(d);
			case RepetitionWithSeparator: return this.visitRepetitionWithSeparator(d);
			case Repetition: return this.visitRepetition(d);
			case Alternation: return this.visitAlternation(d);
			case Terminal: return this.visitTerminal(d);
			case Rule: return this.visitRule(d);
			default: throw Error("non exhaustive match");
		}
	}
	/* c8 ignore next */
	visitNonTerminal(e) {}
	/* c8 ignore next */
	visitAlternative(e) {}
	/* c8 ignore next */
	visitOption(e) {}
	/* c8 ignore next */
	visitRepetition(e) {}
	/* c8 ignore next */
	visitRepetitionMandatory(e) {}
	/* c8 ignore next 3 */
	visitRepetitionMandatoryWithSeparator(e) {}
	/* c8 ignore next */
	visitRepetitionWithSeparator(e) {}
	/* c8 ignore next */
	visitAlternation(e) {}
	/* c8 ignore next */
	visitTerminal(e) {}
	/* c8 ignore next */
	visitRule(e) {}
};
export { GAstVisitor };
