2023-09-02 23:15:47 +00:00
|
|
|
use crate::error::Res;
|
|
|
|
use crate::parser::OrgSource;
|
|
|
|
|
2023-09-02 22:46:45 +00:00
|
|
|
mod exiting;
|
2023-09-04 17:00:41 +00:00
|
|
|
mod file_access_interface;
|
2023-09-03 00:46:17 +00:00
|
|
|
mod global_settings;
|
2023-09-02 22:46:45 +00:00
|
|
|
mod list;
|
|
|
|
mod parser_context;
|
|
|
|
mod parser_with_context;
|
|
|
|
|
2023-09-03 19:44:18 +00:00
|
|
|
pub type RefContext<'b, 'g, 'r, 's> = &'b Context<'g, 'r, 's>;
|
|
|
|
pub trait ContextMatcher = for<'b, 'g, 'r, 's> Fn(
|
|
|
|
RefContext<'b, 'g, 'r, 's>,
|
|
|
|
OrgSource<'s>,
|
|
|
|
) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
2023-09-03 15:05:34 +00:00
|
|
|
pub type DynContextMatcher<'c> = dyn ContextMatcher + 'c;
|
2023-09-03 02:44:21 +00:00
|
|
|
pub trait Matcher = for<'s> Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
2023-09-03 16:45:12 +00:00
|
|
|
#[allow(dead_code)]
|
2023-09-03 15:05:34 +00:00
|
|
|
pub type DynMatcher<'c> = dyn Matcher + 'c;
|
2023-09-02 23:28:33 +00:00
|
|
|
|
|
|
|
pub use exiting::ExitClass;
|
2023-09-04 17:00:41 +00:00
|
|
|
pub use file_access_interface::FileAccessInterface;
|
|
|
|
pub use file_access_interface::LocalFileAccessInterface;
|
2023-09-03 02:44:21 +00:00
|
|
|
pub use global_settings::GlobalSettings;
|
|
|
|
pub use list::List;
|
|
|
|
pub use parser_context::Context;
|
2023-09-02 23:28:33 +00:00
|
|
|
pub use parser_context::ContextElement;
|
|
|
|
pub use parser_context::ExitMatcherNode;
|
|
|
|
pub(crate) use parser_with_context::parser_with_context;
|