Skip to main content

Module eval

Module eval 

Source
Expand description

Interpreter state and beta-reduction.

Expression evaluation lives entirely in crate::compile; what remains here is genuinely runtime: the Interp state every primitive threads (images, hooks, cross-references, decorations, …), function application, and pattern matching. Follows evaluator.cppo.ml’s naive interpreter, not its bytecode VM, which was deliberately not ported.

Structs§

EvalError
Interp
Evaluation state threaded through every primitive: font metrics, images, hooks, cross-references, and the per-trial accumulators below.

Enums§

DecoEntry
See Interp::decos.
FirePass
Which callbacks a walk over placed geometry (crate::fire_hooks and the helpers it shares with page_break_core) is allowed to invoke.

Functions§

match_pattern
Structural pattern matching against an already-evaluated scrutinee. Returns true (and appends every bound value, POSITIONALLY, in the order they were encountered) on a structural match; returns false (leaving bindings for this attempt unusable — callers must use a fresh Vec per arm) otherwise.