flatten method
Returns a parser that discards the result of the receiver and answers the sub-string its delegate consumes.
If a message
is provided, the flatten parser can switch to a fast mode
where error tracking within the receiver is suppressed and in case of a
problem message
is reported instead.
For example, the parser letter().plus().flatten()
returns 'abc'
for the input 'abc'
. In contrast, the parser letter().plus()
would
return ['a', 'b', 'c']
for the same input instead.
Implementation
@useResult
Parser<String> flatten([String? message]) => FlattenParser<R>(this, message);