Fix using references for context elements.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use self::parser_context::Context;
|
||||
use crate::error::Res;
|
||||
use crate::parser::OrgSource;
|
||||
|
||||
@@ -8,14 +7,17 @@ mod list;
|
||||
mod parser_context;
|
||||
mod parser_with_context;
|
||||
|
||||
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>>;
|
||||
pub type RefContext<'b, 'r, 's> = &'b Context<'r, 's>;
|
||||
pub trait ContextMatcher =
|
||||
for<'b, 'r, 's> Fn(RefContext<'b, '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>>;
|
||||
pub trait Matcher = for<'s> Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
||||
type DynMatcher<'c> = dyn Matcher + 'c;
|
||||
|
||||
pub use exiting::ExitClass;
|
||||
pub use global_settings::GlobalSettings;
|
||||
pub use list::List;
|
||||
pub use parser_context::Context;
|
||||
pub use parser_context::ContextElement;
|
||||
pub use parser_context::ExitMatcherNode;
|
||||
pub(crate) use parser_with_context::parser_with_context;
|
||||
|
||||
Reference in New Issue
Block a user