import type {IParser, Option} from "../masala-parser.js"; import type {EmptyTupleParser, MixedParser, SingleParser, TupleParser} from "./tuple-parser.js"; declare type MASALA_VOID_TYPE = symbol; /** * Special case of a [[SingleParser]], but easier to write. * Note that `VoidParser.then(VoidParser)` will produce a [[TupleParser]] where * inner value is `[]`. Same result with `optrep()` and `rep()` */ export interface VoidParser extends IParser { then(dropped: VoidParser): EmptyTupleParser; then(empty: EmptyTupleParser): EmptyTupleParser; then(otherTuple: TupleParser): TupleParser; then(mixed: MixedParser): MixedParser; then(other: SingleParser): TupleParser; then(p: IParser): TupleParser; rep(): EmptyTupleParser; opt(): SingleParser>; /* or(other: VoidParser): VoidParser; or>(other: P): VoidParser | P; opt(): IParser>; // Accepted with one or more occurrences.Will produce an Tuple of at least one T rep(): VoidParser; // Accepted with zero or more occurrences. Will produce a Tuple of zero or more T //optrep(): VoidParser; */ }