failure<R> function Null safety

Parser<R> failure<R>(
  1. [String message = 'unable to parse']
)

Returns a parser that consumes nothing and fails.

For example, failure() always fails, no matter what input it is given.

Implementation

Parser<R> failure<R>([String message = 'unable to parse']) =>
    FailureParser<R>(message);