private IExpression UnaryOpExpression(string consumed
, string consumedUp)
{
if (consumed == null)
{
IExpression expr;
switch (lexer.Token())
{
case MySqlToken.OpExclamation:
{
lexer.NextToken();
expr = UnaryOpExpression(null, null);
return new NegativeValueExpression(expr).SetCacheEvalRst(cacheEvalRst);
}
case MySqlToken.OpPlus:
{
lexer.NextToken();
return UnaryOpExpression(null, null);
}
case MySqlToken.OpMinus:
{
lexer.NextToken();
expr = UnaryOpExpression(null, null);
return new MinusExpression(expr).SetCacheEvalRst(cacheEvalRst);
}
case MySqlToken.OpTilde:
{
lexer.NextToken();
expr = UnaryOpExpression(null, null);
return new BitInvertExpression(expr).SetCacheEvalRst(cacheEvalRst);
}
case MySqlToken.KwBinary:
{
lexer.NextToken();
expr = UnaryOpExpression(null, null);
return new CastBinaryExpression(expr).SetCacheEvalRst(cacheEvalRst);
}
}
}
return CollateExpression(consumed, consumedUp);
}