parseOn method
Primitive method doing the actual parsing.
The method is overridden in concrete subclasses to implement the
parser specific logic. The methods takes a parse context
and
returns the resulting context, which is either a Success or
Failure context.
Implementation
@override
Result<R> parseOn(Context context) {
final result = delegate.parseOn(context);
if (result.isSuccess) {
return result.success(callback(result.value));
} else {
return result.failure(result.message);
}
}