Skip to main content

Module syntax

Module syntax 

Source

Structs§

Inline
Inline run produced by the markup tokenizer.
ListItem
One entry inside an Item::List. inlines is the item’s own text (markers stripped, parsed with the same inline tokenizer as paragraphs); children carries nested blocks, currently restricted to further Item::Lists per the MVP scope.
ParseResult
Output of crate::parse. Diagnostics may include warnings even when the tree is structurally usable; callers decide what to do per ParseResult::has_errors.
RawBlockView
Borrowed view of an Item::RawBlock payload.
SyntaxTree
Concrete syntax tree for a single .mos source file.

Enums§

DirectiveKind
Tag for the directive shapes Item::Set can represent: the #set <target>(...) configuration directive vs the standalone #image(...), #figure(...), and #bibliography(...) calls. The lowerer dispatches on this rather than the Item::Set::name string so #set image(...) can never collide with #image(...).
InlineKind
Item
Top-level construct in a .mos file.
LengthUnit
RawBlockKind
SetArg
One argument inside a directive body: either a key: value pair (the only form #set accepts) or a positional value (a leading string literal allowed on #image(...) / #figure(...)).
SetValue
Literal values recognised inside a #set body. Full expression evaluation (#let, function calls, if) is deferred to MVP 5; this covers what the manifest examples actually use.