diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-03 21:30:36 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-03 21:34:49 +0100 |
| commit | d86a5e8a1f469dd79abf3137dba77a71fae2a774 (patch) | |
| tree | fc7ab35d999322b9d124e41ab80948df23965d26 /src/syntax/token.rs | |
| parent | 6fcef9973be4253e5b377251dd9d1921f9738fc1 (diff) | |
Tidy up raw blocks 🧹
- 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
Diffstat (limited to 'src/syntax/token.rs')
| -rw-r--r-- | src/syntax/token.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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", |
