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>;
Parameter | Type | Description |
---|---|---|
parser | Parser<T> | The parser to wrap |
Returns:
Parser<T>