@thi.ng/parse
Version:
Purely functional parser combinators & AST generation for generic inputs
38 lines • 1.27 kB
TypeScript
import type { NumOrString, Predicate } from "@thi.ng/api";
import type { LitParser } from "../api.js";
/**
* HOF predicate for matching single char within given range.
*
* @param min -
* @param max -
*/
export declare const rangeP: <T extends NumOrString>(min: T, max: T) => Predicate<T>;
/**
* HOF predicate for matching single char within given UTF16 codepoint
* range.
*
* @param min -
* @param max -
*/
export declare const utf16RangeP: (min: number, max: number) => Predicate<string>;
export declare function range(min: string, max: string, id?: string): LitParser<string>;
export declare function range(min: number, max: number, id?: string): LitParser<number>;
export declare function rangeD(min: string, max: string): LitParser<string>;
export declare function rangeD(min: number, max: number): LitParser<number>;
/**
* Matches single char in given UTF-16 codepoint range.
*
* @param min -
* @param max -
* @param id -
*/
export declare const utf16Range: (min: number, max: number, id?: string) => LitParser<string>;
/**
* Matches single char in given UTF-16 codepoint range.
*
* @param min -
* @param max -
* @param id -
*/
export declare const utf16RangeD: (min: number, max: number) => LitParser<string>;
//# sourceMappingURL=range.d.ts.map