Documentation ¶
Overview ¶
Package tokeniser implements a tokeniser for the format/transformer intermediate language
Index ¶
Constants ¶
const StringToken = -1
StringToken is the value given to Token instances holding a raw string
Variables ¶
This section is empty.
Functions ¶
func EmitColour ¶
EmitColour is the companion to ParseColour, it converts a color.Color to the intermediate representation for use in larger tooling
func Map ¶
Map maps a string containing intermediate formatting to the strings specified by the mapping arg. Its a helper method to easily implement simple swapping for a Transformer implementation. If colourFn returns false, the sentinel and colour rune are added to the string as they are
func ParseColour ¶
ParseColour Converts a string hex colour to a color.RGBA colour
Types ¶
type Token ¶
Token represents a single chunk of intermediate format information