From 5dbc7dc5aaaea794b140c5ea7839d681110d7b79 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 9 Jan 2020 18:44:29 +0100 Subject: =?UTF-8?q?Introduce=20color=20tokens=20=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/mod.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/syntax/mod.rs') 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); -- cgit v1.2.3