Starting to separate the context and parsed tokens into their own modules.

This commit is contained in:
Tom Alexander
2023-09-02 18:46:45 -04:00
parent 25b8c80d4e
commit b47029fdbb
8 changed files with 13 additions and 10 deletions

11
src/context/mod.rs Normal file
View 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;