@Override protected Void visitArithmeticBinary(ArithmeticBinaryExpression node, Integer indentLevel) { print(indentLevel, node.getOperator().toString()); super.visitArithmeticBinary(node, indentLevel + 1); return null; }
@Override protected Void visitArithmeticBinary(ArithmeticBinaryExpression node, Integer indentLevel) { print(indentLevel, node.getOperator().toString()); super.visitArithmeticBinary(node, indentLevel + 1); return null; }
@Override protected String visitArithmeticBinary(ArithmeticBinaryExpression node, Void context) { return formatBinaryExpression(node.getOperator().getValue(), node.getLeft(), node.getRight()); }
@Override protected String visitArithmeticBinary(ArithmeticBinaryExpression node, Void context) { return formatBinaryExpression(node.getOperator().getValue(), node.getLeft(), node.getRight()); }
@Override protected Type visitArithmeticBinary(ArithmeticBinaryExpression node, StackableAstVisitorContext<Context> context) { return getOperator(context, node, OperatorType.valueOf(node.getOperator().name()), node.getLeft(), node.getRight()); }
@Override protected Type visitArithmeticBinary(ArithmeticBinaryExpression node, StackableAstVisitorContext<Context> context) { return getOperator(context, node, OperatorType.valueOf(node.getOperator().name()), node.getLeft(), node.getRight()); }
@Override protected Boolean visitArithmeticBinary(ArithmeticBinaryExpression actual, Node expectedExpression) { if (expectedExpression instanceof ArithmeticBinaryExpression) { ArithmeticBinaryExpression expected = (ArithmeticBinaryExpression) expectedExpression; if (actual.getOperator() == expected.getOperator()) { return process(actual.getLeft(), expected.getLeft()) && process(actual.getRight(), expected.getRight()); } } return false; }
@Override protected Boolean visitArithmeticBinary(ArithmeticBinaryExpression actual, Node expectedExpression) { if (expectedExpression instanceof ArithmeticBinaryExpression) { ArithmeticBinaryExpression expected = (ArithmeticBinaryExpression) expectedExpression; if (actual.getOperator() == expected.getOperator()) { return process(actual.getLeft(), expected.getLeft()) && process(actual.getRight(), expected.getRight()); } } return false; }
.setHighValue(NaN); else if (node.getOperator() == ArithmeticBinaryExpression.Operator.DIVIDE && rightLow < 0 && rightHigh > 0) { result.setLowValue(Double.NEGATIVE_INFINITY) .setHighValue(Double.POSITIVE_INFINITY); else if (node.getOperator() == ArithmeticBinaryExpression.Operator.MODULUS) { double maxDivisor = max(abs(rightLow), abs(rightHigh)); if (leftHigh <= 0) { double v1 = operate(node.getOperator(), leftLow, rightLow); double v2 = operate(node.getOperator(), leftLow, rightHigh); double v3 = operate(node.getOperator(), leftHigh, rightLow); double v4 = operate(node.getOperator(), leftHigh, rightHigh); double lowValue = min(v1, v2, v3, v4); double highValue = max(v1, v2, v3, v4);
@Override protected Object visitArithmeticBinary(ArithmeticBinaryExpression node, Object context) { Object left = process(node.getLeft(), context); if (left == null) { return null; } Object right = process(node.getRight(), context); if (right == null) { return null; } if (hasUnresolvedValue(left, right)) { return new ArithmeticBinaryExpression(node.getOperator(), toExpression(left, type(node.getLeft())), toExpression(right, type(node.getRight()))); } return invokeOperator(OperatorType.valueOf(node.getOperator().name()), types(node.getLeft(), node.getRight()), ImmutableList.of(left, right)); }
@Override protected Object visitArithmeticBinary(ArithmeticBinaryExpression node, Object context) { Object left = process(node.getLeft(), context); if (left == null) { return null; } Object right = process(node.getRight(), context); if (right == null) { return null; } if (hasUnresolvedValue(left, right)) { return new ArithmeticBinaryExpression(node.getOperator(), toExpression(left, type(node.getLeft())), toExpression(right, type(node.getRight()))); } return invokeOperator(OperatorType.valueOf(node.getOperator().name()), types(node.getLeft(), node.getRight()), ImmutableList.of(left, right)); }
.setHighValue(NaN); else if (node.getOperator() == ArithmeticBinaryExpression.Operator.DIVIDE && rightLow < 0 && rightHigh > 0) { result.setLowValue(Double.NEGATIVE_INFINITY) .setHighValue(Double.POSITIVE_INFINITY); else if (node.getOperator() == ArithmeticBinaryExpression.Operator.MODULUS) { double maxDivisor = max(abs(rightLow), abs(rightHigh)); if (leftHigh <= 0) { double v1 = operate(node.getOperator(), leftLow, rightLow); double v2 = operate(node.getOperator(), leftLow, rightHigh); double v3 = operate(node.getOperator(), leftHigh, rightLow); double v4 = operate(node.getOperator(), leftHigh, rightHigh); double lowValue = min(v1, v2, v3, v4); double highValue = max(v1, v2, v3, v4);
@Override protected RowExpression visitArithmeticBinary(ArithmeticBinaryExpression node, Void context) { RowExpression left = process(node.getLeft(), context); RowExpression right = process(node.getRight(), context); return call( arithmeticExpressionSignature(node.getOperator(), getType(node), left.getType(), right.getType()), getType(node), left, right); }
@Override protected RowExpression visitArithmeticBinary(ArithmeticBinaryExpression node, Void context) { RowExpression left = process(node.getLeft(), context); RowExpression right = process(node.getRight(), context); return call( arithmeticExpressionSignature(node.getOperator(), getType(node), left.getType(), right.getType()), getType(node), left, right); }