organic/src/context/mod.rs

30 lines
882 B
Rust
Raw Normal View History

2023-09-02 23:15:47 +00:00
use crate::error::Res;
use crate::parser::OrgSource;
2023-09-04 17:26:11 +00:00
mod context;
mod exiting;
mod file_access_interface;
2023-09-03 00:46:17 +00:00
mod global_settings;
mod list;
mod parser_with_context;
2023-09-11 17:11:08 +00:00
type RefContext<'b, 'g, 'r, 's> = &'b Context<'g, 'r, 's>;
trait ContextMatcher = for<'b, 'g, 'r, 's> Fn(
RefContext<'b, 'g, 'r, 's>,
OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>>;
2023-09-11 17:11:08 +00:00
type DynContextMatcher<'c> = dyn ContextMatcher + 'c;
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:11:08 +00:00
type DynMatcher<'c> = dyn Matcher + 'c;
2023-09-02 23:28:33 +00:00
2023-09-11 17:11:08 +00:00
use context::Context;
use context::ContextElement;
use context::ExitMatcherNode;
use exiting::ExitClass;
use file_access_interface::FileAccessInterface;
use file_access_interface::LocalFileAccessInterface;
use global_settings::GlobalSettings;
use list::List;
(crate) use parser_with_context::parser_with_context;