parjs
Version:
A parser-combinator library for JavaScript.
18 lines (17 loc) • 487 B
TypeScript
/**
* @module parjs/combinators
*/
/** */
import { Parjser } from "../parjser";
/**
* A parser with logic to be determined later. Useful for defining some kinds
* of recursive parsers.
*/
export interface DelayedParjser<T> extends Parjser<T> {
init(resolved: Parjser<T>): any;
}
/**
* Returns a parser that has no logic by itself and must be initialized with
* another parser by calling the parser's `init` function.
*/
export declare function later<T>(): DelayedParjser<T>;