OptionalParserExtension<T> extension

on

Methods

optional() Parser<T?>
Returns new parser that accepts the receiver, if possible. The resulting parser returns the result of the receiver, or null if not applicable.
optionalWith(T value) Parser<T>
Returns new parser that accepts the receiver, if possible. The resulting parser returns the result of the receiver, or value if not applicable.