Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 889 Bytes

prsc.except.md

File metadata and controls

26 lines (16 loc) · 889 Bytes

Home > prsc > except

except() function

Creates a Parser that matches only if the first Parser matches input at the starting position, but the second Parser does not.

Signature:

export declare function except<T, U>(match: Parser<T>, except: Parser<U>, expected: string[]): Parser<T>;

Parameters

Parameter Type Description
match Parser<T> Parser that should match
except Parser<U> Parser that should not match
expected string[] Expected values for parse errors generated when the except parser succeeds

Returns:

Parser<T>