diff options
Diffstat (limited to 'src/library/breaks.rs')
| -rw-r--r-- | src/library/breaks.rs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/library/breaks.rs b/src/library/breaks.rs deleted file mode 100644 index a622350f..00000000 --- a/src/library/breaks.rs +++ /dev/null @@ -1,47 +0,0 @@ -use super::prelude::*; - -/// Ends the current line. -#[derive(Debug, PartialEq)] -pub struct LinebreakFunc; - -impl Function for LinebreakFunc { - fn parse(header: &FuncHeader, body: Option<&str>, _: ParseContext) -> ParseResult<Self> - where Self: Sized { - if has_arguments(header) { - return err("linebreak: expected no arguments"); - } - - if body.is_some() { - return err("linebreak: expected no body"); - } - - Ok(LinebreakFunc) - } - - fn layout(&self, _: LayoutContext) -> LayoutResult<CommandList> { - Ok(commands![Command::FinishFlexRun]) - } -} - -/// Ends the current page. -#[derive(Debug, PartialEq)] -pub struct PagebreakFunc; - -impl Function for PagebreakFunc { - fn parse(header: &FuncHeader, body: Option<&str>, _: ParseContext) -> ParseResult<Self> - where Self: Sized { - if has_arguments(header) { - return err("pagebreak: expected no arguments"); - } - - if body.is_some() { - return err("pagebreak: expected no body"); - } - - Ok(PagebreakFunc) - } - - fn layout(&self, _: LayoutContext) -> LayoutResult<CommandList> { - Ok(commands![Command::FinishLayout]) - } -} |
