organic/src/context/mod.rs

22 lines
686 B
Rust
Raw Normal View History

2023-09-02 23:15:47 +00:00
use self::parser_context::Context;
use crate::error::Res;
use crate::parser::OrgSource;
mod exiting;
2023-09-03 00:46:17 +00:00
mod global_settings;
mod list;
mod parser_context;
mod parser_with_context;
2023-09-02 23:28:33 +00:00
pub type RefContext<'r, 's> = &'r Context<'r, 's>;
trait ContextMatcher =
for<'r, 's> Fn(RefContext<'r, 's>, OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>>;
type DynContextMatcher<'c> = dyn ContextMatcher + 'c;
trait Matcher = for<'s> Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>>;
type DynMatcher<'c> = dyn Matcher + 'c;
2023-09-02 23:28:33 +00:00
pub use exiting::ExitClass;
pub use parser_context::ContextElement;
pub use parser_context::ExitMatcherNode;
pub(crate) use parser_with_context::parser_with_context;