Adjust visibility

This commit is contained in:
Greg Shuflin 2022-10-16 17:35:30 -07:00
parent 95a6d935e4
commit 750cc23a29
2 changed files with 4 additions and 4 deletions

View File

@ -6,9 +6,9 @@ mod sequence;
use bnf::Bnf;
use std::rc::Rc;
type ParseResult<I, O, E> = Result<(O, I), E>;
pub type ParseResult<I, O, E> = Result<(O, I), E>;
trait Parser<I, O, E> {
pub trait Parser<I, O, E> {
fn parse(&self, input: I) -> ParseResult<I, O, E>;
fn bnf(&self) -> Option<Bnf> {
None
@ -50,7 +50,7 @@ trait Parser<I, O, E> {
}
}
struct BoxedParser<'a, I, O, E> {
pub struct BoxedParser<'a, I, O, E> {
inner: Box<dyn Parser<I, O, E> + 'a>,
}

View File

@ -1,6 +1,6 @@
use crate::Parser;
pub(crate) fn tuple2<P1, P2, I, O1, O2, E>(parser1: P1, parser2: P2) -> impl Parser<I, (O1, O2), E>
pub fn tuple2<P1, P2, I, O1, O2, E>(parser1: P1, parser2: P2) -> impl Parser<I, (O1, O2), E>
where
P1: Parser<I, O1, E>,
P2: Parser<I, O2, E>,