module

Obelisk

Constants

EOF_TOKEN = Token.new(TokenType::Text, "")

Special EOF token

VERSION = "0.1.0"

Class methods

export_theme_chroma(style : Style) : String

Export a style to Chroma XML format

Source
export_theme_json(style : Style, pretty : Bool = true) : String

Export a style to JSON format

Source
export_theme_tmtheme(style : Style) : String

Export a style to tmTheme format

Source
formatter(name : String) : Formatter | Nil

Get a formatter by name

Source
formatter_names

List all available formatter names

Source
highlight(source : String, language : String, formatter : String = "html", style : String = "github") : String

Convenience method for quick syntax highlighting

Source
lexer(name : String) : Lexer | Nil

Get a lexer by name or language

Source
lexer_names

List all available lexer names

Source
load_theme(path : String) : Style

Load a theme from a file

Source
load_theme_from_string(content : String, format : ThemeLoader::Format, name : String) : Style

Load a theme from string content with explicit format

Source
save_theme(style : Style, path : String, format : ThemeLoader::Format | Nil = nil) : Nil

Save a style to a file

Source
style(name : String) : Style | Nil

Get a style/theme by name

Source
style_names

List all available style names

Source

Nested types