diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-01-16 17:51:04 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-01-16 17:51:04 +0100 |
| commit | 08b91a265fcda74f5463473938ec33873b49a7f7 (patch) | |
| tree | 747ac6a0b385a14a4aa5adbc3f21ef7b9653bd78 /src/func/mod.rs | |
| parent | 15ad30555bdad8e7b192fdcf7d4543c0d3fb18ce (diff) | |
Powerful parser testing 🐱👤
Diffstat (limited to 'src/func/mod.rs')
| -rw-r--r-- | src/func/mod.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/func/mod.rs b/src/func/mod.rs index 90b2a31d..bfc2774c 100644 --- a/src/func/mod.rs +++ b/src/func/mod.rs @@ -14,12 +14,7 @@ mod macros; pub mod prelude { pub use crate::func::{Scope, ParseFunc, LayoutFunc, Command, Commands}; pub use crate::layout::prelude::*; - pub use crate::syntax::{ - ParseContext, ParseResult, - SyntaxTree, FuncCall, FuncArgs, - Expression, Ident, ExpressionKind, - Spanned, Span - }; + pub use crate::syntax::*; pub use crate::size::{Size, Size2D, SizeBox, ValueBox, ScaleSize, FSize, PSize}; pub use crate::style::{LayoutStyle, PageStyle, TextStyle}; pub use Command::*; @@ -31,7 +26,7 @@ pub trait ParseFunc { /// Parse the header and body into this function given a context. fn parse( - args: FuncArgs, + header: FuncHeader, body: Option<&str>, ctx: ParseContext, metadata: Self::Meta, @@ -125,7 +120,7 @@ pub struct Scope { /// A function which parses the source of a function into a function type which /// implements [`LayoutFunc`]. type Parser = dyn Fn( - FuncArgs, + FuncHeader, Option<&str>, ParseContext ) -> ParseResult<Box<dyn LayoutFunc>>; |
