diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-12-12 22:19:38 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-12-12 22:19:38 +0100 |
| commit | ff107cf3e75acf041f8b7631337d299cdeaa1685 (patch) | |
| tree | 40799f0337a5c2bc13166ff32a1f0b4f5c23bfe8 /src/syntax/mod.rs | |
| parent | 3c0496bb6104f0e2a60520e42137ecc29f26e9fa (diff) | |
Tidying up 🧹
Diffstat (limited to 'src/syntax/mod.rs')
| -rw-r--r-- | src/syntax/mod.rs | 12 |
1 files changed, 4 insertions, 8 deletions
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<E: ExpressionKind>(opt: ParseResult<Option<Spanned<E>>>) -> ParseResult<Spanned<E>> { match opt { Ok(Some(spanned)) => Ok(spanned), |
