private Expression FinishUnaryNegate() {
// Special case to ensure that System.Int32.MinValue is an int and not a BigInteger
if (PeekToken().Kind == TokenKind.Constant) {
Token t = PeekToken();
if (t.Value is BigInteger) {
BigInteger bi = (BigInteger)t.Value;
uint iVal;
if (bi.AsUInt32(out iVal) && iVal == 0x80000000) {
string tokenString = _tokenizer.GetTokenString(); ;
Debug.Assert(tokenString.Length > 0);
if (tokenString[tokenString.Length - 1] != 'L' &&
tokenString[tokenString.Length - 1] != 'l') {
NextToken();
return new ConstantExpression(-2147483648);
}
}
}
}
return new UnaryExpression(PythonOperator.Negate, ParseFactor());
}