summaryrefslogtreecommitdiff
path: root/src/func
diff options
context:
space:
mode:
Diffstat (limited to 'src/func')
-rw-r--r--src/func/macros.rs6
-rw-r--r--src/func/mod.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/func/macros.rs b/src/func/macros.rs
index bbe04b98..3a32ec09 100644
--- a/src/func/macros.rs
+++ b/src/func/macros.rs
@@ -80,7 +80,7 @@ macro_rules! function {
fn parse(
args: FuncArgs,
- $body: Option<Spanned<&str>>,
+ $body: Option<&str>,
$ctx: ParseContext,
$metadata: Self::Meta,
) -> ParseResult<Self> where Self: Sized {
@@ -144,7 +144,7 @@ macro_rules! parse {
(optional: $body:expr, $ctx:expr) => (
if let Some(body) = $body {
- Some($crate::syntax::parse(body.v, $ctx)?)
+ Some($crate::syntax::parse(body, $ctx)?)
} else {
None
}
@@ -152,7 +152,7 @@ macro_rules! parse {
(expected: $body:expr, $ctx:expr) => (
if let Some(body) = $body {
- $crate::syntax::parse(body.v, $ctx)?
+ $crate::syntax::parse(body, $ctx)?
} else {
error!("expected body");
}
diff --git a/src/func/mod.rs b/src/func/mod.rs
index aca612aa..69f28e00 100644
--- a/src/func/mod.rs
+++ b/src/func/mod.rs
@@ -32,7 +32,7 @@ pub trait ParseFunc {
/// Parse the header and body into this function given a context.
fn parse(
args: FuncArgs,
- body: Option<Spanned<&str>>,
+ body: Option<&str>,
ctx: ParseContext,
metadata: Self::Meta,
) -> ParseResult<Self> where Self: Sized;
@@ -125,7 +125,7 @@ pub struct Scope {
/// implements [`LayoutFunc`].
type Parser = dyn Fn(
FuncArgs,
- Option<Spanned<&str>>,
+ Option<&str>,
ParseContext
) -> ParseResult<Box<dyn LayoutFunc>>;