Skip to main content

Highlighter

Struct Highlighter 

Source
pub struct Highlighter { /* private fields */ }
Expand description

the highlighter of a grammar (see the module header)

Implementations§

Source§

impl Highlighter

Source

pub const fn new(g: &'static Grammar) -> Highlighter

an app’s own grammar

Source

pub const fn plain() -> Highlighter

plain text: no tokens

Source

pub const fn rust() -> Highlighter

Rust

Source

pub const fn json() -> Highlighter

JSON (and JSONC comments)

Source

pub const fn ini() -> Highlighter

INI files

Source

pub const fn toml() -> Highlighter

TOML

Source

pub const fn markdown() -> Highlighter

a Markdown subset

Source

pub const fn jfs() -> Highlighter

the scripting language of JFScript (.jfs, JFNetworker’s scripts)

Source

pub const fn javascript() -> Highlighter

JavaScript (template strings over lines with their ${..}, regular expressions)

Source

pub const fn css() -> Highlighter

CSS (selectors, at-rules, properties, values with units and colours, nested rules)

Source

pub const fn html() -> Highlighter

HTML (also XML and SVG): tags, attributes, comments, entities, doctype; the content of