2023-09-02 23:15:47 +00:00
|
|
|
use crate::error::Res;
|
|
|
|
use crate::parser::OrgSource;
|
|
|
|
|
2023-10-08 22:01:42 +00:00
|
|
|
mod constants;
|
2023-10-16 22:54:41 +00:00
|
|
|
#[allow(clippy::module_inception)]
|
2023-09-04 17:26:11 +00:00
|
|
|
mod context;
|
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_with_context;
|
|
|
|
|
2023-09-11 17:13:28 +00:00
|
|
|
pub(crate) type RefContext<'b, 'g, 'r, 's> = &'b Context<'g, 'r, 's>;
|
|
|
|
pub(crate) trait ContextMatcher = for<'b, 'g, 'r, 's> Fn(
|
2023-09-03 19:44:18 +00:00
|
|
|
RefContext<'b, 'g, 'r, 's>,
|
|
|
|
OrgSource<'s>,
|
|
|
|
) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
2023-09-11 17:13:28 +00:00
|
|
|
type DynContextMatcher<'c> = dyn ContextMatcher + 'c;
|
|
|
|
pub(crate) 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-11 17:13:28 +00:00
|
|
|
type DynMatcher<'c> = dyn Matcher + 'c;
|
2023-09-02 23:28:33 +00:00
|
|
|
|
2023-09-11 17:13:28 +00:00
|
|
|
pub(crate) use context::Context;
|
|
|
|
pub(crate) use context::ContextElement;
|
|
|
|
pub(crate) use context::ExitMatcherNode;
|
|
|
|
pub(crate) use exiting::ExitClass;
|
|
|
|
pub use file_access_interface::FileAccessInterface;
|
|
|
|
pub use file_access_interface::LocalFileAccessInterface;
|
2023-10-08 22:06:56 +00:00
|
|
|
pub use global_settings::EntityDefinition;
|
2023-09-11 17:13:28 +00:00
|
|
|
pub use global_settings::GlobalSettings;
|
2023-09-16 02:31:15 +00:00
|
|
|
pub use global_settings::HeadlineLevelFilter;
|
2023-09-29 20:37:22 +00:00
|
|
|
pub use global_settings::DEFAULT_TAB_WIDTH;
|
2023-09-11 17:13:28 +00:00
|
|
|
pub(crate) use list::List;
|
2023-10-16 21:28:28 +00:00
|
|
|
pub(crate) use parser_with_context::bind_context;
|
2023-09-11 17:13:28 +00:00
|
|
|
pub(crate) use parser_with_context::parser_with_context;
|