Expand description
Expression and scripting evaluator (manifest §4, §25).
The “evaluator” is really a lowerer + resolver: it walks a
[SyntaxTree] from mos-parse and builds the typed semantic
[Document] graph from mos-core (manifest §6 stage 2), then
runs the resolve pass to assign section numbers and rewrite
@label cross-references (§6 stage 3, MVP 1).
Modules§
- suggest 🔒
- Conservative nearest-match selection for “did you mean” diagnostics.
Structs§
- Document
Metadata - Document-level metadata harvested from
#set document(...)directives. - Evaluation
State 🔒 - Evaluator
- Lowerer from parse syntax to semantic document graph.
- Lower
Result - Result of lowering a [
SyntaxTree] into a [Document].
Enums§
- Page
Fixpoint Outcome - The result of driving page references to a fixpoint.
Constants§
- DOC_
ATTR - Attribute key holding a node’s attached
/** … */doc-comment text. Read by the LSP hover handler. - LABEL_
SPAN_ 🔒END_ ATTR - LABEL_
SPAN_ 🔒START_ ATTR
Functions§
- insert_
label_ 🔒attributes - lower
- Convenience: parse + lower + resolve in one step. Concatenates the diagnostics from each stage so callers can render them uniformly.
- lower_
raw_ 🔒block - lower_
tree - Lower an already-parsed [
SyntaxTree]. - resolve
- Run the resolver pass over
documentin place. Returns any diagnostics produced; the document is modified regardless of whether errors are present so partial output is still renderable. - resolve_
page_ reference_ fixpoint - Drive page-reference resolution to a fixpoint against an injected
layout. - resolve_
page_ references - Rewrite every
@page(label)reference’s visible text.