public object Math2Value(CLS_Content content, char code, object left, CLS_Content.Value right, out CLType returnType)
{
returnType = type;
int tLeft = System.Convert.ToInt32(left);
int tRight = System.Convert.ToInt32(right.value);
switch (code)
{
case '+':
return tLeft + tRight;
case '-':
return tLeft - tRight;
case '*':
return tLeft * tRight;
case '/':
return tLeft / tRight;
case '%':
return tLeft % tRight;
case '<':
return tLeft << tRight;
case '>':
return tLeft >> tRight;
case '&':
return tLeft & tRight;
case '|':
return tLeft | tRight;
case '~':
return ~tLeft;
case '^':
return tLeft ^ tRight;
}
throw new NotImplementedException();
}