UNPKG

@thi.ng/parse

Version:

Purely functional parser combinators & AST generation for generic inputs

16 lines 543 B
import type { Parser } from "../api.js"; export declare const alt: <T>(parsers: Parser<T>[]) => Parser<T>; /** * Syntax sugar for {@link alt}. Takes an array of strings to match and creates * parsers for each before passing them to `alt()`. * * @param strings */ export declare const altS: (strings: string[]) => Parser<string>; /** * Wrapped version of {@link alt} which discards results if successful match. * * @param parsers */ export declare const altD: <T>(parsers: Parser<T>[]) => Parser<any>; //# sourceMappingURL=alt.d.ts.map