-
Notifications
You must be signed in to change notification settings - Fork 29
Colortemplate Data Model
Lifepillar edited this page Jun 2, 2023
·
3 revisions
Colortemplate is essentially a transpiler: it takes the definition of a color scheme in a custom syntax and outputs a color scheme in Vim syntax. As such, its main components are:
- a parser (or “frontend”, to use trendy buzzwords), and
- a color scheme generator (or “backend“).
Typically, a parser returns a more or less abstract and hierarchical representation of the parsed text in the form of a parse tree or abstract syntax tree. Colortemplate, instead, transforms the parsed text into an in-memory Relational database, which can then be conveniently queried by the generator to produce the output (or by other components for other purposes, e.g., to produce color statistics).
The data model, depicted below, is implemented in autoload/v3/colorscheme.vim
: