Expand description
The lowering feature: the registrations every backend relies on.
The lowering feature (LoweringFeature, an FlmFeature) registers
what lowering needs on any backend:
- the presentation vocabulary (
super::super::pres), throughpres::register(); - the default lowering rules of the structural elements (
super::rules), among them the rule of the field element (FIELD), which every field carries (a macro that a construct absorbs as data, such as a\labelwritten after a heading; see fields: data a construct reads); - the two native-set implications the lowering driver relies on
(
native_implications); - the service slot
NAMER_SLOT, through which the embedding program gives the path of each artifact of an output, and the service slotREGIONS_SLOT, through which each backend states which of its outputs are made of output regions.
The rules are registered here so that they exist in every registry that
renders anything: the language layer creates a field node wherever a
declaration carries a field, and a construct that fails to read its field
must be reported regardless of which features are registered. A backend’s own feature
(TextBackend, for
instance) is registered beside this one and adds the backend, its stages
and its output. Registering this feature twice into one registry is a
registry build error, so a package lists it once.
Structs§
- Lowering
Feature - The
loweringfeature: it registers the presentation vocabulary (pres::register()), the default lowering rules of the structural elements, the field element’s among them (default_rules), the native-set implications the driver relies on (native_implications), and the service slotsNAMER_SLOTandREGIONS_SLOT(see the module documentation).
Constants§
- FEATURE_
NAME - The name under which this feature is registered,
lowering; also the middle segment of its conditions’ identifiers,flm.lowering.*(super::error). - NAMER_
SLOT - The service slot
flm.artifacts.namer(service_slot), holding at most oneArtifactNamer: the embedding program’s naming scheme, which gives the path of each artifact of an output, relative to the output location. - REGIONS_
SLOT - The service slot
flm.output.regions, holding oneRegionsOutputper output whose entry artifact is made of output regions (Regions), in contribution order.
Functions§
- feature
- The
loweringfeature as a shared value, ready to be listed in a package entry. - native_
implications - The two native-set implications the lowering driver relies on, which this feature declares so that the registry build checks every backend against them.