Put back in needed pubs.

This commit is contained in:
Tom Alexander
2023-09-11 13:13:28 -04:00
parent 7650a9edff
commit 84953c1669
71 changed files with 522 additions and 515 deletions

View File

@@ -2,18 +2,18 @@ use nom::error::ErrorKind;
use nom::error::ParseError;
use nom::IResult;
type Res<T, U> = IResult<T, U, CustomError<T>>;
pub(crate) type Res<T, U> = IResult<T, U, CustomError<T>>;
// TODO: MyError probably shouldn't be based on the same type as the input type since it's used exclusively with static strings right now.
#[derive(Debug)]
enum CustomError<I> {
pub enum CustomError<I> {
MyError(MyError<I>),
Nom(I, ErrorKind),
IO(std::io::Error),
}
#[derive(Debug)]
struct MyError<I>( I);
pub struct MyError<I>(pub(crate) I);
impl<I> ParseError<I> for CustomError<I> {
fn from_error_kind(input: I, kind: ErrorKind) -> Self {

View File

@@ -1,4 +1,4 @@
mod error;
use error::CustomError;
use error::MyError;
use error::Res;
pub(crate) use error::CustomError;
pub(crate) use error::MyError;
pub(crate) use error::Res;