Starting to separate the context and parsed tokens into their own modules.
This commit is contained in:
parent
25b8c80d4e
commit
b47029fdbb
11
src/context/mod.rs
Normal file
11
src/context/mod.rs
Normal file
@ -0,0 +1,11 @@
|
||||
mod exiting;
|
||||
mod list;
|
||||
mod parser_context;
|
||||
mod parser_with_context;
|
||||
|
||||
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;
|
@ -15,5 +15,7 @@ pub use compare::get_emacs_version;
|
||||
#[cfg(feature = "compare")]
|
||||
pub use compare::get_org_mode_version;
|
||||
|
||||
mod context;
|
||||
mod error;
|
||||
pub mod parser;
|
||||
mod types;
|
||||
|
@ -26,14 +26,11 @@ mod latex_fragment;
|
||||
mod lesser_block;
|
||||
mod lesser_element;
|
||||
mod line_break;
|
||||
mod list;
|
||||
mod object;
|
||||
mod object_parser;
|
||||
mod org_macro;
|
||||
mod org_source;
|
||||
mod paragraph;
|
||||
mod parser_context;
|
||||
mod parser_with_context;
|
||||
mod plain_link;
|
||||
mod plain_list;
|
||||
mod plain_text;
|
||||
@ -114,10 +111,3 @@ pub use source::Source;
|
||||
use self::org_source::OrgSource;
|
||||
use self::parser_context::Context;
|
||||
use crate::error::Res;
|
||||
|
||||
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;
|
||||
|
0
src/types/mod.rs
Normal file
0
src/types/mod.rs
Normal file
Loading…
x
Reference in New Issue
Block a user