contour
Types
pub type Token {
Whitespace(String)
Keyword(String)
String(String)
Number(String)
Variant(String)
Function(String)
Module(String)
Operator(String)
Comment(String)
Other(String)
}
Constructors
-
Whitespace(String)
-
Keyword(String)
-
String(String)
-
Number(String)
-
Variant(String)
-
Function(String)
-
Module(String)
-
Operator(String)
-
Comment(String)
-
Other(String)
Functions
pub fn to_ansi(code: String) -> String
Highlight source code using ansi colours!
Token | Colour |
---|---|
Keyword | Yellow |
Module | Cyan |
Variant | Green |
Function | Blue |
Operator | Magenta |
Comment | Italic grey |
String, Number | Green |
Whitespace, other | No colour |
If you wish to use some other colours or other format entirely see
to_tokens
.