Adjust visibility
This commit is contained in:
parent
95a6d935e4
commit
750cc23a29
@ -6,9 +6,9 @@ mod sequence;
|
|||||||
use bnf::Bnf;
|
use bnf::Bnf;
|
||||||
use std::rc::Rc;
|
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 parse(&self, input: I) -> ParseResult<I, O, E>;
|
||||||
fn bnf(&self) -> Option<Bnf> {
|
fn bnf(&self) -> Option<Bnf> {
|
||||||
None
|
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>,
|
inner: Box<dyn Parser<I, O, E> + 'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::Parser;
|
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
|
where
|
||||||
P1: Parser<I, O1, E>,
|
P1: Parser<I, O1, E>,
|
||||||
P2: Parser<I, O2, E>,
|
P2: Parser<I, O2, E>,
|
||||||
|
Loading…
Reference in New Issue
Block a user