Skip to main content

Module langs

Module langs 

Source
Expand description

Escriba-local language plugins — the languages the fleet syntax spine does not ship yet.

hikari owns the highlighting machinery: LangTable is the per-language data, TableLexer is the ONE scanner that reads it, and TablePlugin adapts the pair to LanguagePlugin. Nothing here re-implements any of that — a language is a table, which is the whole point of the table backend. If a second escriba language ever needs the same treatment, it is another static and another row in escriba_local, not another module.

These plugins register last in build_ecosystem, behind both hikari backends, so the day hikari ships a blue grammar or table upstream this one is skipped and the local copy retires itself without an edit.

§Why a table and not tree-sitter

There is no tree-sitter-blue grammar — not in hikari-ts, not upstream. The table backend is what every non-tree-sitter language in escriba already gets (nix, yaml, lua, toml, …), so .b is served at exactly the tier its neighbours are, and no defmode :tree-sitter claims a grammar that does not exist.

§Why blue’s keyword set is not read from blue-lang-syntax

It would be the drift-proof spelling, and it was rejected on the numbers:

  • blue-lang-syntax is at 0.0.12 on crates.io. Under cargo’s semver rules a 0.0.x version is its own compatibility range — "0.0.12" means exactly 0.0.12 — so the dependency would not follow blue at all. It went through eleven releases in the three hours after first publish; escriba would be pinned to a dead one immediately and would need a manual bump per blue release. The “cannot drift” property is illusory at 0.0.x.
  • It would drag tatara-lisp 0.3.21 into a workspace pinned at 0.3.3, for all twenty-one crates, to import fifteen strings.
  • The rest of blue is not on crates.io, and escriba is published (escriba 0.1.20), so a git = dependency is categorically out: it would freeze escriba’s own publishing.

So the table is transcribed, and BLUE_RESERVED_WORDS documents the exact upstream definition it is transcribed from. The blue toolchain (blue lsp, blue fmt) is wired the other way — as a binary on $PATH — which needs no registry at all and follows blue automatically.

Constants§

BLUE
The language id escriba resolves .b files to.

Statics§

BLUE_RESERVED_WORDS
blue’s reserved words, transcribed from blue_lang_syntax::parse: SURFACE_KEYWORDS (the eleven form heads) plus the four block-structure words is_reserved_word adds on top of it.
BLUE_SELECTORS
How a document claims to be blue.
BLUE_TABLE
blue’s lexical shape.

Functions§

escriba_local
Every language escriba registers on top of the two hikari backends.