captureResultGeneric<T> method
Internal helper to capture the generic type R
of the parse result from
extension methods. This makes it possible to wrap the parser without
loosing type information.
Implementation
@internal
@nonVirtual
T captureResultGeneric<T>(T Function<R>(Parser<R> self) callback) =>
callback<R>(this);