opt method

Parser<T> opt(
  1. {bool backtrack = true}
)

Produces an optional copy of this parser.

If backtrack is true (default), then a failed parse will not modify the scanner state.

Implementation

Parser<T> opt({bool backtrack: true}) => new _Opt(this, backtrack);