Give global options their own lifetime.

This commit is contained in:
Tom Alexander
2023-09-03 15:44:18 -04:00
parent a7b9eb9db4
commit df79cbd0b7
48 changed files with 470 additions and 466 deletions

View File

@@ -18,8 +18,8 @@ use crate::parser::util::get_consumed;
use crate::types::OrgMacro;
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn org_macro<'r, 's>(
context: RefContext<'_, 'r, 's>,
pub fn org_macro<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgMacro<'s>> {
let (remaining, _) = tag("{{{")(input)?;
@@ -45,8 +45,8 @@ pub fn org_macro<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn org_macro_name<'r, 's>(
_context: RefContext<'_, 'r, 's>,
fn org_macro_name<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
let (remaining, _) = verify(anychar, |c| c.is_alphabetic())(input)?;
@@ -58,8 +58,8 @@ fn org_macro_name<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn org_macro_args<'r, 's>(
context: RefContext<'_, 'r, 's>,
fn org_macro_args<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, Vec<OrgSource<'s>>> {
let (remaining, _) = tag("(")(input)?;
@@ -71,8 +71,8 @@ fn org_macro_args<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn org_macro_arg<'r, 's>(
context: RefContext<'_, 'r, 's>,
fn org_macro_arg<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
let mut remaining = input;