Skip to main content

const_eval

Function const_eval 

Source
pub fn const_eval(
    node: &SNode,
    env: &ConstEnv,
) -> Result<ConstValue, ConstEvalError>
Expand description

Public entry point: fold a single AST node into a ConstValue or return a ConstEvalError. The env argument supplies earlier const bindings visible to this expression.