diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-01-09 18:44:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-01-09 18:44:29 +0100 |
| commit | 5dbc7dc5aaaea794b140c5ea7839d681110d7b79 (patch) | |
| tree | 116fd84af3f7d9fd82050d9383ff3f9996b8d47d /src/syntax/mod.rs | |
| parent | bc22d1fbc14c918bea8cc49ce71ab9b8921c02fe (diff) | |
Introduce color tokens 🎨
Diffstat (limited to 'src/syntax/mod.rs')
| -rw-r--r-- | src/syntax/mod.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index cb801627..b0cbcafa 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -85,6 +85,26 @@ pub enum Node { Func(FuncCall), } +/// A thing to be syntax highlighted. +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +pub enum ColorToken { + Comment, + Bracket, + FuncName, + Colon, + KeyArg, + Equals, + Comma, + ExprNumber, + ExprSize, + ExprStr, + ExprIdent, + ExprBool, + Bold, + Italic, + Monospace, +} + /// An invocation of a function. #[derive(Debug)] pub struct FuncCall(pub Box<dyn LayoutFunc>); |
