diff options
Diffstat (limited to 'src/func')
| -rw-r--r-- | src/func/macros.rs | 15 | ||||
| -rw-r--r-- | src/func/mod.rs | 1 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/func/macros.rs b/src/func/macros.rs index 17a554cf..df795213 100644 --- a/src/func/macros.rs +++ b/src/func/macros.rs @@ -5,22 +5,25 @@ macro_rules! function { // Parse a unit struct. ($(#[$outer:meta])* pub struct $type:ident; $($rest:tt)*) => { - $(#[$outer])* - pub struct $type; + $(#[$outer])* pub struct $type; function!(@meta $type | $($rest)*); }; // Parse a tuple struct. ($(#[$outer:meta])* pub struct $type:ident($($fields:tt)*); $($rest:tt)*) => { - $(#[$outer])* - pub struct $type($($fields)*); + $(#[$outer])* pub struct $type($($fields)*); function!(@meta $type | $($rest)*); }; // Parse a struct with fields. ($(#[$outer:meta])* pub struct $type:ident { $($fields:tt)* } $($rest:tt)*) => { - $(#[$outer])* - pub struct $type { $($fields)* } + $(#[$outer])* pub struct $type { $($fields)* } + function!(@meta $type | $($rest)*); + }; + + // Parse an enum. + ($(#[$outer:meta])* pub enum $type:ident { $($fields:tt)* } $($rest:tt)*) => { + $(#[$outer])* pub enum $type { $($fields)* } function!(@meta $type | $($rest)*); }; diff --git a/src/func/mod.rs b/src/func/mod.rs index a5328314..babde1ae 100644 --- a/src/func/mod.rs +++ b/src/func/mod.rs @@ -107,6 +107,7 @@ pub enum Command<'a> { FinishRun, FinishSpace, BreakParagraph, + BreakPage, SetTextStyle(TextStyle), SetPageStyle(PageStyle), |
