parjs
Version:
Library for building parsers using combinators.
19 lines • 718 B
TypeScript
import type { ImplicitParjser } from "../../index";
import type { CombinatorInput } from "../combinated";
import { Combinated } from "../combinated";
import type { ParsingState } from "../state";
declare class Exactly<T> extends Combinated<T, T[]> {
private count;
type: string;
expecting: string;
constructor(source: CombinatorInput<T>, count: number);
_apply(ps: ParsingState): void;
}
/**
* Applies the source parser exactly `count` times, and yields all the results in an array.
*
* @param count The number of times to apply the source parser.
*/
export declare function exactly(count: number): <T>(source: ImplicitParjser<T>) => Exactly<T>;
export {};
//# sourceMappingURL=exactly.d.ts.map