public static BoundConstant?Fold(BoundExpression expression) { var folding = new ConstantFolding(); return(expression.Accept(folding)); }
public void OnGUI(string name, IFunction value, CompilerInfo info, Action <string, IFunction> drawOther) { EditorGUILayout.LabelField(name, ((Constant)ConstantFolding.Optimize((Expression)value)).Value.ToString()); }
private static float ToNumber(IFunction value) { return(((Constant)ConstantFolding.Optimize((Expression)value)).Value); }