Hwaro::Content::Processors::CustomLexers
Class methods
Content digest of the grammars the current build registered; "" when none. Folded into the build-cache config hash and the body memo fingerprint, so a grammar edit re-highlights every page.
Instance methods
Register this build's grammars (replacing the previous build's — serve rebuilds in one process) and return their digest. Called once per build from the Initialize phase, before rendering.
The grammar files in dir, sorted for a deterministic load order.
Parse every grammar in dir. Returns the grammars to register, a
{path, message} problem for each file that did not load (or lost
a name to an earlier file, or has a defect that only bites
mid-tokenization, see Tartrazine.hwaro_parse_custom_lexer), and
a digest of the loaded files' bytes ("" when none loaded). Each
file is read once, and a read failure is a problem like a parse
failure — build and doctor both report exactly this list.