pub enum ExpressionContextType<'temp, 'out> {
Runtime(LocalExpressionContext<'temp, 'out>),
Constant(Option<LocalExpressionContext<'temp, 'out>>),
Override,
}
Expand description
The type of Naga IR expression we are lowering an ast::Expression
to.
Variants§
Runtime(LocalExpressionContext<'temp, 'out>)
We are lowering to an arbitrary runtime expression, to be included in a function’s body.
The given LocalExpressionContext
holds information about local
variables, arguments, and other definitions available only to runtime
expressions, not constant or override expressions.
Constant(Option<LocalExpressionContext<'temp, 'out>>)
We are lowering to a constant expression, to be included in the module’s constant expression arena.
Everything global constant expressions are allowed to refer to is
available in the ExpressionContext
, but local constant expressions can
also refer to other
Override
We are lowering to an override expression, to be included in the module’s constant expression arena.
Everything override expressions are allowed to refer to is
available in the ExpressionContext
, so this variant
carries no further information.