@thi.ng/parse
Version:
Purely functional parser combinators & AST generation for generic inputs
17 lines • 553 B
TypeScript
import type { Nullable } from "@thi.ng/api";
import type { Parser } from "../api.js";
import type { ParseScope } from "../context.js";
/**
* Recursively joins non-null results of all children into a single
* string, then discards children. Also see {@link join}.
*
* @param scope -
*/
export declare const xfJoin: <T>(scope: Nullable<ParseScope<T>>) => ParseScope<T> | null;
/**
* Syntax sugar for `xform(parser, xfJoin)`.
*
* @param parser -
*/
export declare const join: <T>(parser: Parser<T>) => Parser<T>;
//# sourceMappingURL=join.d.ts.map