Skip to main content

Crate farben_core

Crate farben_core 

Source
Expand description

Core library for the farben terminal styling crate.

Provides the full pipeline for parsing farben markup strings into ANSI escape sequences: tokenization (lexer), ANSI encoding (ansi), rendering (parser), named style registration (registry), and error types (errors).

Typical usage flows through the lexer::tokenize and parser::render functions, with optional style definitions via the registry module and its macros.

Modules§

ansi
ANSI SGR escape sequence encoding for farben styles.
errors
Error types produced during farben markup tokenization.
lexer
Tokenizer for farben markup strings.
parser
Token stream renderer.
registry
Global named style registry.

Macros§

prefix
Sets a prefix string on a previously defined named style.
style
Defines a named style in the global registry.