From 750cc23a29856d38c4efc7d54504499b5dfda6bc Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sun, 16 Oct 2022 17:35:30 -0700 Subject: [PATCH] Adjust visibility --- src/lib.rs | 6 +++--- src/sequence.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 21bc95a..7a0fb80 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,9 +6,9 @@ mod sequence; use bnf::Bnf; use std::rc::Rc; -type ParseResult = Result<(O, I), E>; +pub type ParseResult = Result<(O, I), E>; -trait Parser { +pub trait Parser { fn parse(&self, input: I) -> ParseResult; fn bnf(&self) -> Option { None @@ -50,7 +50,7 @@ trait Parser { } } -struct BoxedParser<'a, I, O, E> { +pub struct BoxedParser<'a, I, O, E> { inner: Box + 'a>, } diff --git a/src/sequence.rs b/src/sequence.rs index 8673451..9983ee4 100644 --- a/src/sequence.rs +++ b/src/sequence.rs @@ -1,6 +1,6 @@ use crate::Parser; -pub(crate) fn tuple2(parser1: P1, parser2: P2) -> impl Parser +pub fn tuple2(parser1: P1, parser2: P2) -> impl Parser where P1: Parser, P2: Parser,