blob: 9068db90149bfd9bc96de69d47ad8645d01a9fec [file] [log] [blame]
import '../core/parser.dart';
import '../parser/combinator/choice.dart';
// Internal helper to build an optimal choice parser.
Parser<R> buildChoice<R>(List<Parser<R>> parsers) =>
parsers.length == 1 ? parsers.first : parsers.toChoiceParser();