oni_comb_parser_rs/internal/parser_impl/add_impl.rs
1use crate::core::Parser;
2use crate::extension::parser::OperatorParser;
3use std::fmt::Debug;
4use std::ops::Add;
5
6impl<'a, I, A, B> Add<Parser<'a, I, B>> for Parser<'a, I, A>
7where
8 A: Clone + Debug + 'a,
9 B: Clone + Debug + 'a,
10{
11 type Output = Parser<'a, I, (A, B)>;
12
13 fn add(self, rhs: Parser<'a, I, B>) -> Self::Output {
14 self.and_then(rhs)
15 }
16}