Skip to main content

Module lower

Module lower 

Source
Expand description

Lowering of declarations to protocol schema, shared by the macros and the build tool so both derive identical descriptors.

Functions§

check_languages
The language side of check_translations: tags, missing languages and the plural forms each language needs. Enum labels, whose placeholders are their variant’s fields, take only these checks.
check_translations
Problems with one tr!: duplicate or unknown language tags, missing translations in strict mode, plural forms a language lacks, and placeholder/argument mismatches. languages is (supported, strict) when a project configuration exists.
content
#[content] of a field, which only text takes.
is_date
Whether ty is the framework’s calendar date.
is_text
Whether text is the whole of a type: text, or optional or listed text.
label
A variant’s label. Its placeholders are the variant’s fields, shown as the label’s text says: text that is data (#[content]), numbers, enums by their labels, dates with {field, date, …}.
protocol_descriptor
Collect the protocol’s types, state and commands into a descriptor.
protocol_descriptor_with
protocol_descriptor for the protocol of a module, which may also use the value types of the protocols of the modules it depends on: imported. Each it uses is copied into its own table, with the types that one uses in turn, so the descriptor stays self-contained.
resolve
Resolve a syntax type against a self-contained type table.