parjs
Version:
A parser-combinator library for JavaScript.
15 lines (14 loc) • 647 B
TypeScript
/**
* @module parjs/combinators
*/
/** */
import { ImplicitParjser, ParjsCombinator } from "../../index";
/**
* Applies the source parser repeatedly until it fails softly, with each pair of
* applications separated by applying `delimeter`. Also terminates if `delimeter`
* fails softly. Yields all the results of the source parser in an array.
* @param delimeter Parser that separates two applications of the source.
* @param max Optionally, then maximum number of times to apply the source
* parser. Defaults to `Infinity`.
*/
export declare function manySepBy<T>(delimeter: ImplicitParjser<any>, max?: number): ParjsCombinator<T, T[]>;