Module eval

Module eval 

Source

Enums§

CachedConstantValue
ConstEvalError
An error raised during evaluation of a constant expression

Traits§

ConstEnvironment
There are two phases to constant evaluation, one during semantic analysis, and another phase performed during linking of the final assembly, on any constant expressions that were left partially or unevaluated during semantic analysis due to external references. This trait is used to abstract over the environment in which the evaluator runs, so that we can use it in both phases by simply providing a suitable implementation.

Functions§

expr
Evaluate expr in env, producing a new ConstantExpr representing the value produced as the result of evaluation.