skip method
Returns a parser that consumes input before
and after
the receiver,
but discards the parse results of before
and after
and only returns
the result of the receiver.
For example, the parser digit().skip(char('['), char(']'))
returns '3'
for the input '[3]'
.
Implementation
@useResult
Parser<R> skip({Parser<void>? before, Parser<void>? after}) =>
SkipParser<R>(this,
before: before ?? epsilon(), after: after ?? epsilon());