trail method

Parser<T> trail(
  1. Pattern pattern
)

Consumes and ignores any trailing occurrences of pattern.

Implementation

Parser<T> trail(Pattern pattern) =>
    then(match(pattern).opt()).first().cast<T>();