oni_comb_parser_rs/internal/parser_impl/
skip_parser_impl.rs

1use crate::core::Parser;
2use crate::extension::parser::SkipParser;
3use crate::extension::parsers::SkipParsers;
4use crate::internal::ParsersImpl;
5use std::fmt::Debug;
6
7impl<'a, I, A> SkipParser<'a> for Parser<'a, I, A> {
8  fn skip_left<B>(self, pb: Self::P<'a, Self::Input, B>) -> Self::P<'a, Self::Input, B>
9  where
10    Self::Output: Clone + Debug + 'a,
11    B: Clone + Debug + 'a, {
12    ParsersImpl::skip_left(self, pb)
13  }
14
15  fn skip_right<B>(self, pb: Self::P<'a, Self::Input, B>) -> Self::P<'a, Self::Input, Self::Output>
16  where
17    Self::Output: Clone + Debug + 'a,
18    B: Clone + Debug + 'a, {
19    ParsersImpl::skip_right(self, pb)
20  }
21
22  fn surround<B, C>(
23    self,
24    left_parser: Self::P<'a, Self::Input, B>,
25    right_parser: Self::P<'a, Self::Input, C>,
26  ) -> Self::P<'a, Self::Input, Self::Output>
27  where
28    Self::Output: Clone + Debug + 'a,
29    B: Clone + Debug + 'a,
30    C: Clone + Debug + 'a, {
31    ParsersImpl::surround(left_parser, self, right_parser)
32  }
33}