From a75ddd2c9356da85b155f5c52fd064c15e6f81b3 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 10 Jan 2020 13:03:43 +0100 Subject: =?UTF-8?q?Convert=20spans=20to=20line/column=20format=20?= =?UTF-8?q?=F0=9F=93=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/func/macros.rs | 6 +++--- src/func/mod.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/func') 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>, + $body: Option<&str>, $ctx: ParseContext, $metadata: Self::Meta, ) -> ParseResult 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>, + body: Option<&str>, ctx: ParseContext, metadata: Self::Meta, ) -> ParseResult where Self: Sized; @@ -125,7 +125,7 @@ pub struct Scope { /// implements [`LayoutFunc`]. type Parser = dyn Fn( FuncArgs, - Option>, + Option<&str>, ParseContext ) -> ParseResult>; -- cgit v1.2.3