From 7c0899b5373cdc4f1083a0a8515856207c431423 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 13 Oct 2019 13:10:21 +0200 Subject: =?UTF-8?q?Run=20rustfmt=20=F0=9F=9A=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/syntax.rs') diff --git a/src/syntax.rs b/src/syntax.rs index b2140642..9c7e4908 100644 --- a/src/syntax.rs +++ b/src/syntax.rs @@ -6,24 +6,26 @@ use std::fmt::{self, Display, Formatter}; use crate::func::Function; use crate::size::Size; - /// A logical unit of the incoming text stream. #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum Token<'s> { /// One or more whitespace (non-newline) codepoints. Space, - /// A line feed (`\n`, `\r\n` and some more as defined by the Unicode standard). + /// A line feed (`\n`, `\r\n` and some more as defined by the Unicode + /// standard). Newline, /// A left bracket: `[`. LeftBracket, /// A right bracket: `]`. RightBracket, - /// A colon (`:`) indicating the beginning of function arguments (Function header only). + /// A colon (`:`) indicating the beginning of function arguments (Function + /// header only). /// - /// If a colon occurs outside of a function header, it will be tokenized as a - /// [Word](Token::Word). + /// If a colon occurs outside of a function header, it will be tokenized as + /// a [Word](Token::Word). Colon, - /// An equals (`=`) sign assigning a function argument a value (Function header only). + /// An equals (`=`) sign assigning a function argument a value (Function + /// header only). Equals, /// A comma (`,`) separating two function arguments (Function header only). Comma, @@ -39,8 +41,9 @@ pub enum Token<'s> { LineComment(&'s str), /// A block comment. BlockComment(&'s str), - /// A star followed by a slash unexpectedly ending a block comment (the comment was not started - /// before, otherwise a [BlockComment](Token::BlockComment) would be returned). + /// A star followed by a slash unexpectedly ending a block comment (the + /// comment was not started before, otherwise a + /// [BlockComment](Token::BlockComment) would be returned). StarSlash, /// Everything else is just text. Text(&'s str), @@ -98,7 +101,7 @@ impl PartialEq for FuncCall { pub struct FuncHeader { pub name: String, pub args: Vec, - pub kwargs: HashMap + pub kwargs: HashMap, } /// A value expression. -- cgit v1.2.3