void ReplaceIntervals(Expression done) { Expression node = GetExpressionParent(done); if (node == null) { return; } Interval leftInterval = TailorUtil.GetInterval(node.Left); Interval rightInterval = TailorUtil.GetInterval(node.Right); if (leftInterval != null) { if (rightInterval != null) { ReplaceBothIntervals(node, leftInterval, rightInterval); } else { ReplaceLeftInterval(node, leftInterval); } } else if (rightInterval != null) { ReplaceRightInterval(node, rightInterval); } }
void CoalesceIntervals(Expression done) { Expression node = GetExpressionParent(done); if (node == null) { return; } Interval leftInterval = TailorUtil.GetInterval(node.Left); Interval rightInterval = TailorUtil.GetInterval(node.Right); if ((leftInterval != null) && (rightInterval != null)) { ReplaceIntervalOp(node, leftInterval, rightInterval); } }