Module

lexie/generate_highlighter

src/lexie/generate_highlighter.pooka

Colouring in, without choosing the crayons.

Generates the optional highlighter.pooka: each token's highlight category, the text it covers, and its span. No HTML or colours; just the categories, for any renderer to use.

API reference

function

source

src/lexie/generate_highlighter.pooka:18
source(c: Config) -> String
INFERREDfn(lexie/config.Config) -> String

The source of highlighter.pooka for a specification.

function

category

src/lexie/generate_highlighter.pooka:113
category(kind: token.Kind) -> String
INFERREDfn(lexie/token.Kind) -> String

The highlight category of a kind of token.