From 4dbd9285c91d59d527f4324df4aaf239ecb007ca Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 11 Jun 2021 14:00:06 +0200 Subject: Basic enums --- src/syntax/token.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/syntax/token.rs') diff --git a/src/syntax/token.rs b/src/syntax/token.rs index 2263f806..254a56a2 100644 --- a/src/syntax/token.rs +++ b/src/syntax/token.rs @@ -118,6 +118,10 @@ pub enum Token<'s> { /// One or two dollar signs followed by inner contents, terminated with the /// same number of dollar signs. Math(MathToken<'s>), + /// A numbering: `23.`. + /// + /// Can also exist without the number: `.`. + Numbering(Option), /// An identifier: `center`. Ident(&'s str), /// A boolean: `true`, `false`. @@ -256,6 +260,7 @@ impl<'s> Token<'s> { Self::UnicodeEscape(_) => "unicode escape sequence", Self::Raw(_) => "raw block", Self::Math(_) => "math formula", + Self::Numbering(_) => "numbering", Self::Ident(_) => "identifier", Self::Bool(_) => "boolean", Self::Int(_) => "integer", -- cgit v1.2.3