return new YieldNode(position, node, state);
}
public Node negateInteger(Node integerNode) {
if (integerNode instanceof FixnumNode) {
FixnumNode fixnumNode = (FixnumNode) integerNode;
fixnumNode.setValue(-fixnumNode.getValue());
return fixnumNode;
} else if (integerNode instanceof BignumNode) {
BignumNode bignumNode = (BignumNode) integerNode;
BigInteger value = bignumNode.getValue().negate();
// Negating a bignum will make the last negative value of our bignum
if (value.compareTo(RubyBignum.LONG_MIN) >= 0) {
return new FixnumNode(bignumNode.getPosition(), value.longValue());
}
bignumNode.setValue(value);
}