Creates a Parser that skips the next code point if the given predicate returns true.
This counts in unicode characters (code points), not UTF-16 code units.
To match a sequence of code points, consider using codepoints
instead.
Signature:
export declare function codepoint(isMatch: (codepoint: number) => boolean, expected: string[]): Parser<void>;
Parameter | Type | Description |
---|---|---|
isMatch | (codepoint: number) => boolean | callback called with the next codepoint, should return whether that matches |
expected | string[] | expected strings to return if the codepoint does not match |
Returns:
Parser<void>