From 08eb59acd36c85879f1797dec53b14a8ff3157fd Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 4 Sep 2023 13:26:11 -0400 Subject: [PATCH] Rename parser_context to context. --- src/context/{parser_context.rs => context.rs} | 0 src/context/global_settings.rs | 11 ++++++----- src/context/mod.rs | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) rename src/context/{parser_context.rs => context.rs} (100%) diff --git a/src/context/parser_context.rs b/src/context/context.rs similarity index 100% rename from src/context/parser_context.rs rename to src/context/context.rs diff --git a/src/context/global_settings.rs b/src/context/global_settings.rs index cc7e644..4b68272 100644 --- a/src/context/global_settings.rs +++ b/src/context/global_settings.rs @@ -1,20 +1,21 @@ -use super::FileAccessInterface; -use super::LocalFileAccessInterface; +// use super::FileAccessInterface; +// use super::LocalFileAccessInterface; use crate::types::Object; // TODO: Ultimately, I think we'll need most of this: https://orgmode.org/manual/In_002dbuffer-Settings.html #[derive(Debug, Clone)] -pub struct GlobalSettings<'g, 's, F: FileAccessInterface> { +// , F: FileAccessInterface +pub struct GlobalSettings<'g, 's> { pub radio_targets: Vec<&'g Vec>>, - pub file_access: F, + // pub file_access: F, } impl<'g, 's> GlobalSettings<'g, 's> { pub fn new() -> Self { GlobalSettings { radio_targets: Vec::new(), - file_access: LocalFileAccessInterface, + // file_access: LocalFileAccessInterface, } } } diff --git a/src/context/mod.rs b/src/context/mod.rs index fbf4618..42f63fd 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -1,11 +1,11 @@ use crate::error::Res; use crate::parser::OrgSource; +mod context; mod exiting; mod file_access_interface; mod global_settings; mod list; -mod parser_context; mod parser_with_context; pub type RefContext<'b, 'g, 'r, 's> = &'b Context<'g, 'r, 's>; @@ -18,12 +18,12 @@ pub trait Matcher = for<'s> Fn(OrgSource<'s>) -> Res, OrgSource<'s #[allow(dead_code)] pub type DynMatcher<'c> = dyn Matcher + 'c; +pub use context::Context; +pub use context::ContextElement; +pub use context::ExitMatcherNode; pub use exiting::ExitClass; pub use file_access_interface::FileAccessInterface; pub use file_access_interface::LocalFileAccessInterface; 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;