pub struct Highlighter { /* private fields */ }Expand description
the highlighter of a grammar (see the module header)
Implementations§
Source§impl Highlighter
impl Highlighter
Sourcepub const fn new(g: &'static Grammar) -> Highlighter
pub const fn new(g: &'static Grammar) -> Highlighter
an app’s own grammar
Sourcepub const fn plain() -> Highlighter
pub const fn plain() -> Highlighter
plain text: no tokens
Sourcepub const fn rust() -> Highlighter
pub const fn rust() -> Highlighter
Rust
Sourcepub const fn json() -> Highlighter
pub const fn json() -> Highlighter
JSON (and JSONC comments)
Sourcepub const fn ini() -> Highlighter
pub const fn ini() -> Highlighter
INI files
Sourcepub const fn toml() -> Highlighter
pub const fn toml() -> Highlighter
TOML
Sourcepub const fn markdown() -> Highlighter
pub const fn markdown() -> Highlighter
a Markdown subset
Sourcepub const fn jfs() -> Highlighter
pub const fn jfs() -> Highlighter
the scripting language of JFScript (.jfs, JFNetworker’s scripts)
Sourcepub const fn javascript() -> Highlighter
pub const fn javascript() -> Highlighter
JavaScript (template strings over lines with their ${..}, regular expressions)
Sourcepub const fn css() -> Highlighter
pub const fn css() -> Highlighter
CSS (selectors, at-rules, properties, values with units and colours, nested rules)
Sourcepub const fn html() -> Highlighter
pub const fn html() -> Highlighter
HTML (also XML and SVG): tags, attributes, comments, entities, doctype; the content of