oni_comb_parser_rs/internal/parser_impl/
parser_functor_impl.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::core::{Parser, ParserFunctor, Parsers};
use crate::internal::ParsersImpl;

impl<'a, I, A> ParserFunctor<'a> for Parser<'a, I, A> {
  fn map<B, F>(self, f: F) -> Self::P<'a, Self::Input, B>
  where
    F: Fn(Self::Output) -> B + 'a,
    Self::Input: 'a,
    Self::Output: Clone + 'a,
    B: Clone + 'a, {
    ParsersImpl::map(self, f)
  }
}