示例#1
0
    public static BoundConstant?Fold(BoundExpression expression)
    {
        var folding = new ConstantFolding();

        return(expression.Accept(folding));
    }
示例#2
0
 public void OnGUI(string name, IFunction value, CompilerInfo info, Action <string, IFunction> drawOther)
 {
     EditorGUILayout.LabelField(name, ((Constant)ConstantFolding.Optimize((Expression)value)).Value.ToString());
 }
示例#3
0
 private static float ToNumber(IFunction value)
 {
     return(((Constant)ConstantFolding.Optimize((Expression)value)).Value);
 }