From d86a5e8a1f469dd79abf3137dba77a71fae2a774 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 3 Feb 2021 21:30:36 +0100 Subject: =?UTF-8?q?Tidy=20up=20raw=20blocks=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Better trimming (only trim at the end if necessary) - Fixed block-level layouting - Improved pretty printing - Flip inline variable to block - Flip inline variable to display for math formulas --- src/syntax/token.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/syntax/token.rs') diff --git a/src/syntax/token.rs b/src/syntax/token.rs index c4b9ec8f..5e69a350 100644 --- a/src/syntax/token.rs +++ b/src/syntax/token.rs @@ -170,9 +170,9 @@ pub struct TokenRaw<'s> { pub struct TokenMath<'s> { /// The formula between the dollars. pub formula: &'s str, - /// Whether the formula was surrounded by one dollar (true) or two dollars - /// (false). - pub inline: bool, + /// Whether the formula is display-level, that is, it is surrounded by + /// `$[..]`. + pub display: bool, /// Whether the closing dollars were present. pub terminated: bool, } @@ -243,8 +243,8 @@ impl<'s> Token<'s> { Self::Bool(_) => "boolean", Self::Int(_) => "integer", Self::Float(_) => "float", - Self::Length(..) => "length", - Self::Angle(..) => "angle", + Self::Length(_, _) => "length", + Self::Angle(_, _) => "angle", Self::Percent(_) => "percentage", Self::Color(_) => "color", Self::Str(_) => "string", -- cgit v1.2.3