epsilon<T> function

Parser<T> epsilon <T>(
  1. [T result]
)

Returns a parser that consumes nothing and succeeds.

For example, char('a').or(epsilon()) is equivalent to char('a').optional().

Implementation

Parser<T> epsilon<T>([T result]) => EpsilonParser<T>(result);