public CLS_Content.Value ComputeValue(CLS_Content content)
{
content.InStack(this);
var left = listParam[0].ComputeValue(content);
var right = listParam[1].ComputeValue(content);
ICLS_Type type = content.environment.GetType(left.type);
//if (mathop == "+=")
{
CLType returntype;
object value = type.Math2Value(content, mathop, left.value, right, out returntype);
value = type.ConvertTo(content, value, left.type);
left.value = value;
Type t = right.type;
//if(t.IsSubclassOf(typeof(MulticastDelegate))||t.IsSubclassOf(typeof(Delegate)))
//{
//}
////content.Set(value_name, value);
//else if (t == typeof(CSLE.DeleLambda) || t == typeof(CSLE.DeleFunction) || t == typeof(CSLE.DeleEvent))
//{
//}
//else
{
if (listParam[0] is CLS_Expression_MemberFind)
{
CLS_Expression_MemberFind f = listParam[0] as CLS_Expression_MemberFind;
var parent = f.listParam[0].ComputeValue(content);
if (parent == null)
{
throw new Exception("调用空对象的方法:" + f.listParam[0].ToString() + ":" + ToString());
}
var ptype = content.environment.GetType(parent.type);
ptype.function.MemberValueSet(content, parent.value, f.membername, value);
}
if (listParam[0] is CLS_Expression_StaticFind)
{
CLS_Expression_StaticFind f = listParam[0] as CLS_Expression_StaticFind;
f.type.function.StaticValueSet(content, f.staticmembername, value);
}
}
}
//操作变量之
//做数学计算
//从上下文取值
//_value = null;
content.OutStack(this);
return null;
}