oni_comb_parser_rs/internal/parser_impl/
parser_pure_impl.rs

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

impl<'a, I, A> ParserPure<'a> for Parser<'a, I, A> {
  fn pure<F>(value: F) -> Self::P<'a, Self::Input, Self::Output>
  where
    F: Fn() -> Self::Output + 'a,
    Self::Input: 'a,
    Self::Output: 'a, {
    ParsersImpl::successful_lazy(value)
  }
}