Package Internals

Package Internals

Highlights Module

abstract type AbstractLexer

Represents a source code lexer used to tokenise text.

source
abstract type AbstractTheme

Represents a colour scheme used to highlight tokenised source code.

source

Themes Submodule

struct RGB

Represents a single RGB colour value that can be 'active' or 'inactive'.

source
struct Style

An internal type used to track colour scheme definition information such as foreground and background colours as well as bold, italic, and underlining.

source
struct Theme

Represents a "compiled" colour scheme.

source

Convert a three digit hex string to a 3-tuple of UInt8s.

source

Convert a six digit hex string to a 3-tuple of UInt8s.

source

Lexers Submodule

words(vec; prefix, suffix)

Build a regular expression from a vector of strings. Useful for keyword lists.

The keyword arguments prefix and suffix can be used to add patterns before and after the main match group.

Examples

julia> import Highlights.Lexers: words

julia> words(["if", "else"])
r"(if|else)"
source

A utility string macro to avoid having to escape strings used to build a regular expression.

source