From ff107cf3e75acf041f8b7631337d299cdeaa1685 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 12 Dec 2019 22:19:38 +0100 Subject: =?UTF-8?q?Tidying=20up=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/mod.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/syntax/mod.rs') diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index a3fe06bd..2f64bc9b 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -6,14 +6,9 @@ use unicode_xid::UnicodeXID; use crate::func::LayoutFunc; use crate::size::{Size, ScaleSize}; -mod tokens; -#[macro_use] -mod parsing; -mod span; - -pub use span::{Span, Spanned}; -pub use tokens::{tokenize, Tokens}; -pub use parsing::{parse, ParseContext, ParseResult}; +pub_use_mod!(tokens); +pub_use_mod!(parsing); +pub_use_mod!(span); /// A logical unit of the incoming text stream. #[derive(Debug, Copy, Clone, Eq, PartialEq)] @@ -185,6 +180,7 @@ impl FuncArgs { } } +/// Extract the option expression kind from the option or return an error. fn expect(opt: ParseResult>>) -> ParseResult> { match opt { Ok(Some(spanned)) => Ok(spanned), -- cgit v1.2.3