Skip to main content

Module feature

Module feature 

Source
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), through pres::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 \label written 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 slot REGIONS_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§

LoweringFeature
The lowering feature: 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 slots NAMER_SLOT and REGIONS_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 one ArtifactNamer: 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 one RegionsOutput per output whose entry artifact is made of output regions (Regions), in contribution order.

Functions§

feature
The lowering feature 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.