Rename parser_context to context.

This commit is contained in:
Tom Alexander 2023-09-04 13:26:11 -04:00
parent da1ce2717d
commit 08eb59acd3
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 10 additions and 9 deletions

View File

@ -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<Object<'s>>>,
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,
}
}
}

View File

@ -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>, 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;