Expand description
Script languages as host modules register them, and the table that
reaches an installed host. See language::ScriptLanguage.
Script languages, as the app sees them: a registry each host fills in.
The engine runs scripts without knowing any language. A host lives in a
runtime module of its own; installing that module registers a
ScriptLanguage here, under the language’s name, and the app assembly
reaches the host only through the entries of that record: install a
program, swap it on a hot reload, check or compile one ahead of time, read
the markup blocks a script writes, and reach the installed host’s signals
and functions.
Which module provides which language, and for which file extensions, is
the module’s own descriptor (lumen-language.toml), read by
lumen_modules::language. Nothing here, and nothing in the engine, names a
language.
Structs§
- Markup
Block - One markup block a script writes: a fragment of markup a script instantiates by key, read out of the script before anything runs.
- Markup
Block Error - A markup block the language could not read.
- Script
Compile - What an ahead-of-time check or compile is done against: the same things a run hands the host, plus the functions and sources the app’s modules register, declared but never called.
- Script
Host Access - Reaching an installed host, in the terms a caller asks in.
- Script
Language - One script language, as a host module registers it.
- Script
Languages - The languages the app’s host modules registered, in registration order.
- Script
Program - One program, handed to a host to run.
- Unknown
Language - No host is registered for the language a program names.
Traits§
- Script
Language AppExt - Registering a script language on an
App.
Functions§
- install_
program - Install the host registered for
languageoverprogram, and return the table that reaches it. - line_
col - The 1-based line and column of byte
offsetinsrc.
Type Aliases§
- CheckFn
- Compile-check a program without running it:
(source, against). - Compile
Fn - Compile a program to bytecode:
(source, against), giving the image and the compiler’s warnings, one line each. - Image
Exports Fn - The names a bytecode image can be called by, with
fnsbound beside the builtins and none of them called. - Install
Fn - Install a host over a program.
multi_hostis true when the app runs more than one language, which a host needs to keep its signal mirror current with the others. - Markup
Blocks Fn - Read the markup blocks a script writes.
- Reload
Fn - Swap a live host’s program for a hot reload:
(world, source, uri, map),mapsaying where each piece ofsourcewas read from.Nonewhen the host is not installed.