undefined<R> function

  1. @useResult
SettableParser<R> undefined<R>([
  1. String message = 'undefined parser'
])

Returns a parser that is not defined, but that can be set at a later point in time.

For example, the following code sets up a parser that points to itself and that accepts a sequence of a's ended with the letter b.

final p = undefined();
p.set(char('a').seq(p).or(char('b')));

Implementation

@useResult
SettableParser<R> undefined<R>([String message = 'undefined parser']) =>
    failure<R>(message).settable();