diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-11 14:00:06 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-11 14:00:06 +0200 |
| commit | 4dbd9285c91d59d527f4324df4aaf239ecb007ca (patch) | |
| tree | 561a9a18a1eea6a2e598157f305667c4ea8e3e08 /src/syntax/token.rs | |
| parent | 3330767c20e14a05176902a93dcefb08cb509173 (diff) | |
Basic enums
Diffstat (limited to 'src/syntax/token.rs')
| -rw-r--r-- | src/syntax/token.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<usize>), /// 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", |
