Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 750 Bytes

prsc.cut.md

File metadata and controls

24 lines (14 loc) · 750 Bytes

Home > prsc > cut

cut() function

Creates a Parser that turns errors returned by the inner parser into fatal errors. Parsers such as or and star will not continue to attempt additional matches if a parser returns a fatal error, and will usually return the error instead.

Signature:

export declare function cut<T>(parser: Parser<T>): Parser<T>;

Parameters

Parameter Type Description
parser Parser<T> The parser to wrap

Returns:

Parser<T>